Search
Preparing search index...
The search index is not available
EF React Native Style Framework
Options
All
Public
Public/Protected
All
Inherited
Only exported
Menu
Globals
"colour/Hex"
ColourHex
Class ColourHex
Represents a colour value as hex. Normalizes various inputs
example
Create with hex string
const hex = new Hex('#000000'); hex.toString(); // -> '#000000'
example
Create with shortened hex string
const hex = new Hex('#000'); hex.toString(); // -> '#000000'
example
Create with missing hash
const hex = new Hex('000000'); hex.toString(); // -> '#000000'
example
Create with RGB
const hex = new Hex({ red: 0, green: 0, blue: 0 }); hex.toString(); // -> '#000000'
Hierarchy
ColourHex
Index
Constructors
constructor
Accessors
value
Methods
__@to
Primitive
toIRgb
to
String
value
Of
Constructors
constructor
new
Colour
Hex
(
value
:
string
|
IRgb
)
:
ColourHex
Parameters
value:
string
|
IRgb
Returns
ColourHex
Accessors
value
get
value
(
)
:
string
Returns
string
Methods
__@to
Primitive
__@to
Primitive
(
hint
:
"string"
|
"number"
|
"default"
)
:
number
|
string
Parameters
hint:
"string"
|
"number"
|
"default"
Returns
number
|
string
toIRgb
toIRgb
(
)
:
IRgb
Returns
IRgb
to
String
to
String
(
)
:
string
Returns
string
value
Of
value
Of
(
)
:
string
Returns
string
Globals
"colour/
Hex"
Colour
Hex
constructor
value
__@to
Primitive
toIRgb
to
String
value
Of
rgb
ToHex
Represents a colour value as hex. Normalizes various inputs