Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Paste
P54
colors.rst
Active
Public
Actions
Authored by
mahussain
on Feb 29 2020, 12:27 PM.
Edit Paste
Archive Paste
View Raw File
Subscribe
Mute Notifications
Award Token
Tags
None
Subscribers
None
..
_colors:
Colors
################################
..
_colors_types:
Types Of Colors
================================
Color can handle multiple color formats. Each color format is defined by a
separate class. Presently, Anari can handle the following color formats.
-
CMYK
-
Hex
-
RGBA
-
RGBA Float
..
_colors_types_rgba:
RGBA
--------------------------------
:abbr:
`RGBA (red-green-blue-alpha)`
colors are specified with the constructor
:code:
`RGBA()`
, passing the red, green, blue, and alpha values to the
constructor as integers:
..
code-block
::
c++
int
red
=
10
;
int
green
=
50
;
int
blue
=
90
;
int
alpha
=
255
;
RGBA
mycolor
=
RGBA
(
blue
,
green
,
blue
,
alpha
);
The RGBA object can be used by itself to represent a constant RGBA color.
However, it's most commonly used when defining or changing a
:code:
`Color`
value.
Event Timeline
mahussain
created this paste.
Feb 29 2020, 12:27 PM
2020-02-29 12:27:11 (UTC-8)
Log In to Comment