Colors

This Library delivers Hex Codes of Colors frequently used in indicators and strategies.
v3(colorName) Collection: Pinescript v3 Colors.
Parameters:
colorName: Color Name.
Returns: Hex code of the inquired color.
v4(colorName) Collection: Pinescript v4 Colors.
Parameters:
colorName: Color Name.
Returns: Hex code of the inquired color.
Added:
checkLuminance(srcColor, threshold)
To interpret the level of darkness of the provided color, and tag it as dark or light.
Parameters:
srcColor (color): Color to check. Usually a background color. By default 'chart.bg_color'.
threshold (simple int)
Returns: Boolean isDark
Updated:
v3(colorName)
Collection: Pinescript v3 Colors
Parameters:
colorName (simple string): Color Name
Returns: Hex code of the inquired color
v4(colorName)
Collection: Pinescript v4 Colors
Parameters:
colorName (simple string): Color Name
Returns: Hex code of the inquired color
Updated:
checkLuminance(srcColor, threshold)
To interpret the level of darkness of the provided color, and tag it as dark or light.
Parameters:
srcColor (simple color): Color to check. Usually a background color. By default 'chart.bg_color'.
threshold (simple int)
Returns: Boolean isDark
Added:
checkLuminanceSimple(srcColor, threshold)
To interpret the level of darkness of the provided color, and tag it as dark or light.
Parameters:
srcColor (simple color): Color to check. Usually a background color. By default 'chart.bg_color'.
threshold (simple int)
Returns: Boolean isDark
checkLuminanceSeries(srcColor, threshold)
To interpret the level of darkness of the provided color, and tag it as dark or light.
Parameters:
srcColor (color): Color to check. Usually a background color. By default 'chart.bg_color'.
threshold (simple int)
Returns: Boolean isDark
Removed:
checkLuminance(srcColor, threshold)
To interpret the level of darkness of the provided color, and tag it as dark or light.
Added:
checkLuminance(srcColor, threshold)
To interpret the level of darkness of the provided color, and tag it as dark or light.
Parameters:
srcColor (color): Color to check. Usually a background color. By default 'chart.bg_color'.
threshold (simple int)
Returns: Boolean isDark
Removed:
checkLuminanceSimple(srcColor, threshold)
To interpret the level of darkness of the provided color, and tag it as dark or light.
checkLuminanceSeries(srcColor, threshold)
To interpret the level of darkness of the provided color, and tag it as dark or light.
Perpustakaan Pine
Dalam semangat sebenar TradingView, penulis telah menerbitkan kod Pine ini sebagai perpustakaan sumber terbuka supaya pengaturcara Pine lain dari komuniti kami boleh menggunakannya semula. Sorakan kepada penulis! Anda juga boleh menggunakan perpustakaan ini secara peribadi atau dalam penerbitan sumber terbuka lain, tetapi penggunaan semula kod ini dalam penerbitan adalah tertakluk kepada Peraturan Dalaman.
Penafian
Perpustakaan Pine
Dalam semangat sebenar TradingView, penulis telah menerbitkan kod Pine ini sebagai perpustakaan sumber terbuka supaya pengaturcara Pine lain dari komuniti kami boleh menggunakannya semula. Sorakan kepada penulis! Anda juga boleh menggunakan perpustakaan ini secara peribadi atau dalam penerbitan sumber terbuka lain, tetapi penggunaan semula kod ini dalam penerbitan adalah tertakluk kepada Peraturan Dalaman.