|
Color constants can be represented in three ways: literally, by integers,
or by name (for named Web colors only).
カラー定数が3つの方法で表されることができます。リテラル、整数、名前(Webカラーで名づけられた色のみ)によって。
Literal representation consists of three parts representing numerical rate
values of three main color components: red, green, blue. The constant starts
with C and is enclosed in single quotes. Numerical rate values of a color
component lie in the range from 0 to 255.
リテラル表現は3つのメインカラーコンポーネントの数値を表している3つの部分から成り立ちます:赤、緑、青。 定数は C から始めて、そしてシングルクォートで囲われます。
カラーコンポーネントの数値は 0 〜 255 までの範囲です。
Integer-valued representation is written in a form of hexadecimal or a decimal number. A hexadecimal number looks like 0x00BBGGRR where RR is the rate of the red color component, GG - of the green one, and BB - of the blue one. Decimal constants are not directly reflected in RGB. They represent a decimal value of the hexadecimal integer representation.
整数表現は16進数あるいは10進数の形式で書かれます。 16進数表現は 0x00BBGGRR のように表現し、RR が赤色のカラーコンポーネントの数値です。緑色は
GG 、青色は BB です。 10進数表現では RGB で直接反映されません。 それらは16進数表現の10進法の値で表現します。
特定色の表現は Webカラー でセットされています。
Examples:
例:
// symbol constants
C'128,128,128' // gray
C'0x00,0x00,0xFF' // blue
// named color
Red
Yellow
Black
// integer-valued representation
0xFFFFFF // white
16777215 // white
0x008000 // green
32768 // green
Its internal representation is a long integer number of 4 bytes. The first byte will not be considered. The other three bytes contain RGB components.
これらの内部表現は4バイトの整数です。 最初のバイトは考慮されていません。 他の3バイトは RGB コンポーネントを含んでいます。
|