As seen for entering star data, you can give a spectral value that controls the size and colour of the star. Well if the sizes and colors present don't satisfy you, you can change them.
ChView maintains one color for each of the spectral types O, B, A, F, G, K, and M. It also keeps an extra one, X, in case it meets a spectral type it doesn't recognise. The parameters controling these are named StarOColor, StarBColor, ..., StarXColor. The value for these parameters is the name of the color. There are 15 pre-defined colors to choose from:
black | blue | cyan | darkgray | gray |
green | lightgray | magenta | orange | pink |
red | white | yellow | violet | indigo |
If that isn't enough, there are alternate ways of specifying any color. A # symbol folowed by three groups of two digits. The digits are hexidecimal. The first digit controls the red value, the second the green value, and the third the blue value. This may seem arcane but it makes sense to programmers (trust me) and happens to be what HTML uses for things like setting the background color of a page.
For cheating, here is a range of values:
#FF8080 | #FFFF80 | #80FF80 | #00FF80 | #80FFFF | #0080FF | #FF80C0 | #FF80FF |
#FF0000 | #FFFF00 | #80FF00 | #00FF40 | #00FFFF | #0080C0 | #8080C0 | #FF00FF |
#804040 | #FF8040 | #00FF00 | #008080 | #004080 | #8080FF | #800040 | #FF0080 |
#800000 | #FF8000 | #008000 | #008040 | #0000FF | #0000A0 | #800080 | #8000FF |
#400000 | #804000 | #004000 | #004040 | #000080 | #000040 | #400040 | #400080 |
#000000 | #808000 | #808040 | #808080 | #408080 | #C0C0C0 | #400040 | #FFFFFF |
(If you have trouble reading some of the numbers above, try highlighting the row with the cursor.)
So, remapping across the top of the table above we can do:
<applet code=chview.ChViewer archive=chview.jar width=640 height=320> <param name="StarOColor" value="#FF8080"> <param name="StarBColor" value="#FFFF80"> <param name="StarAColor" value="#80FF80"> <param name="StarFColor" value="#00FF80"> <param name="StarGColor" value="#80FFFF"> <param name="StarKColor" value="#0080FF"> <param name="StarMColor" value="#FF80C0"> <param name="body001" value="S!!!O!O!O!1!-9,-9,-9"> <param name="body002" value="S!!!B!B!B!1!-7,-6,-7"> <param name="body003" value="S!!!A!A!A!1!-5,-5,-5"> <param name="body004" value="S!!!F!F!F!1!-3,-3,-3"> <param name="body005" value="S!!!G!G!G!1!-1,-1,-1"> <param name="body006" value="S!!!K!K!K!1!1,1,1"> <param name="body007" value="S!!!M!M!M!1!3,3,3"> <param name="body008" value="S!Dwarf!!Gd!Gd!Gd!1!5,5,5"> <param name="body009" value="S!Giant!!K*!K*!K*!1!7,7,7"> <param name="body010" value="S!Supergiant!!F~!F~!F~!1!9,9,9"> </applet>
By default the name of a star is the same as the color of that star. This, however can be overridden with the parameter NameColor. The value for the parameter is the same as above. For example, if you wanted the star names to always appear white:
<applet code=chview.ChViewer archive=chview.jar width=640 height=160> <param name="NameColor" value="#FFFFFF"> <param name="body001" value="S!!!O!O!O!1!-9,0,0"> <param name="body002" value="S!!!B!B!B!1!-7,0,0"> <param name="body003" value="S!!!A!A!A!1!-5,0,0"> <param name="body004" value="S!!!F!F!F!1!-3,0,0"> <param name="body005" value="S!!!G!G!G!1!-1,0,0"> <param name="body006" value="S!!!K!K!K!1!1,0,0"> <param name="body007" value="S!!!M!M!M!1!3,0,0"> <param name="body008" value="S!Dwarf!!Gd!Gd!Gd!1!5,0,0"> <param name="body009" value="S!Giant!!K*!K*!K*!1!7,0,0"> <param name="body010" value="S!Supergiant!!F~!F~!F~!1!9,0,0"> </applet>
ChView normally draws its background the black of space. However, you can change this via the BackColor parameter for artistic or aestetic reasons. For example, if you wanted to produce an effect like an Astronomical negative, you could do:
<applet code=chview.ChViewer archive=chview.jar width=640 height=320> <param name="BackColor" value="#FFFFFF"> <param name="NameColor" value="#000000"> <param name="StarOColor" value="#202020"> <param name="StarBColor" value="#404040"> <param name="StarAColor" value="#606060"> <param name="StarFColor" value="#808080"> <param name="StarGColor" value="#A0A0A0"> <param name="StarKColor" value="#B0B0B0"> <param name="StarMColor" value="#D0D0D0"> <param name="DataType" value="cherryh"> </applet>
The size of a star varies according to its spectral class. However you can change the radius used by setting parameters name StarORadius, StarBRadius, ..., StarMRadius, plus StarXRadius for unknown spectral types, and special overrides StardRadius, StarGntRadius, and StarSupRadius for dwarfs, giants and supergiants.
The value of the parameter is in pixels. The best thing to do is to experiment with you applet and see what works best.
<applet code=chview.ChViewer archive=chview.jar width=640 height=160> <param name="StarORadius" value="2"> <param name="StarBRadius" value="4"> <param name="StarARadius" value="6"> <param name="StarFRadius" value="8"> <param name="StarGRadius" value="10"> <param name="StarKRadius" value="12"> <param name="StarMRadius" value="10"> <param name="StarXRadius" value="8"> <param name="StardRadius" value="6"> <param name="StarGntRadius" value="4"> <param name="StarSupRadius" value="2"> <param name="body001" value="S!!!O!O!O!1!-9,0,0"> <param name="body002" value="S!!!B!B!B!1!-7,0,0"> <param name="body003" value="S!!!A!A!A!1!-5,0,0"> <param name="body004" value="S!!!F!F!F!1!-3,0,0"> <param name="body005" value="S!!!G!G!G!1!-1,0,0"> <param name="body006" value="S!!!K!K!K!1!1,0,0"> <param name="body007" value="S!!!M!M!M!1!3,0,0"> <param name="body008" value="S!Dwarf!!Gd!Gd!Gd!1!5,0,0"> <param name="body009" value="S!Giant!!K*!K*!K*!1!7,0,0"> <param name="body010" value="S!Supergiant!!F~!F~!F~!1!9,0,0"> </applet>
© 1998-2001 Sol Company. All Rights Reserved.