Hexadecimal Color Numbering System: We have seen how we can specify colors using the popup menus for fill color and stroke color, but it's possible to specify many more colors using what's known as the hexadecimal system. Colors on a computer monitor are displayed by combining different amounts and intensities of the three primary colors red, green, and blue. A common system uses intensities ranging from 0 (no color) to 255 (full intensity). So a bright, pure red color would be red = 255, green = 0, and blue = 0 (255-0-0), while red = 150, green = 0, and blue = 150 (150-0-150) would be a medium purple, and so on. If all three values are 0, it gives black, and all three values at 255 is white. Instead of using the decimal (base 10) values 0 to 255 for this color system, however, computer scientists like to use a hexadecimal (base 16) numbering system, because the hexadecimal system correlates well with the binary (base 2) numbering system of bits (0 and 1 values) that is the foundation of computing systems. The hexadecimal system uses the values 0-9 and A, B, C, D, E, and F for its 16 digits. So the decimal numbers 0 to 255 end up being represented by the hexadecimal numbers 00 to FF. Applied to the color numbering system, each color value consists of three hexadecimal numbers, one for red, one for green, and one for blue (in that order), each ranging from 00 to FF. So a color number might be "#A27C83", meaning red = A2, green = 7C, and blue = 83. The # sign in front indicates that the six digits represent a red-green-blue color combination, not some other number.
|
Grid Size: S M L | Simple View: | MinView: |
|
Coord: x-axis y-axis | Grid Lines: x-axis y-axis | |||
Grid: | 12x12 inches | 24x24 inches | 36x36 inches | |
72x72 inches | 96x96 inches | 192x192 inches | ||
1x1 inches | 2x2 inches | Fraction: | ||
xy-Range: | ||||
|
||||
|
||||
Quad: | 1 Quadrant | 4 Quadrants | 1&4 Quadrants | |
Units: | US Customary | Metric | Ruler: |
Labels: |
|
|
|
Font
px
|
|
Tics Lines: |
|
Width
px
|
Hash Lines: |
|
Width
px
|
(
,
in
) in
|
|
degrees
|
|
(
,
in
) in
|
|
degrees
|
|
(
,
in
) in
|
|
degrees
|
|
(
,
in
) in
|
|
degrees
|
|
(
,
in
) in
|
|
degrees
|
|
(
,
in
) in
|
|
degrees
|
|
(
,
in
) in
|
|
degrees
|
|
(
,
in
) in
|
|
degrees
|
|
(
,
in
) in
|
|
degrees
|
|
(
,
in
) in
|
|
degrees
|
|
(
,
in
) in
|
|
degrees
|
|
(
,
in
) in
|
|
degrees
|
|
(
,
in
) in
|
|
degrees
|
|
(
,
in
) in
|
|
degrees
|
|
(
,
in
) in
|
|
degrees
|
|
(
,
in
) in
|
|
degrees
|
|
(
,
in
) in
|
|
degrees
|
|
(
,
in
) in
|
|
degrees
|
|
|
In the pre-placed "fill color" code block, we have replaced the color menu option with a hexadecimal color option (available in the Drawing menu of code blocks). Using the rectangle code block, plus two circle code blocks and corresponding fill color blocks with hexadecimal color numbers, create the code that will approximate the reddish rectangle, green circle, and blue circle shown on the left side of the grid. Make your drawing appear above the one shown, with the circles centered on the point x = 12, y = 26. |
|
|
|||||||||||
|
|||||||||||