PINE LIBRARY
colorLab

Library "colorLab"
The ColorLab library presents an essential solution for color optimization, leveraging color terms and philosophy. Through its capabilities, it furnishes the necessary versatility to attain optimal color representation and coherence by integrating functions.
tint_level(colour, level)
Determines a Tinted color
Parameters:
colour (color): (series color) Pure color.
level (float): (series float) Optional argument, default = 50. A level of tent color. 0 is entered color and 100 is white color.
Returns: (series color) A color Computed from a linear "Tint" gradient.
shade_level(colour, level)
Determines a Shaded color.
Parameters:
colour (color): (series color) Pure color.
level (float): (series float) Optional argument, default = 50. A level of tent color. 0 is entered color and 100 is Black color.
Returns: (series color) A color Computed from a linear "Shade" gradient.
tone_level(colour, level)
Determines a Tone color.
Parameters:
colour (color): (series color) Pure color.
level (float): (series float) Optional argument, default = 50. A level of tent color. 0 is entered color and 100 is Gray color.
Returns: (series color) A color Computed from a linear "Tone" gradient.
lightness_gradient(colour, value, bottom_value, top_value, bottom_lightness, top_lightness)
Determines a color from a "Lightness" gradient, based on the position of an entered value within a defined range.
Parameters:
colour (color): (series color) Pure color.
value (float): (series float) Value.
bottom_value (float): (series float) Bottom Value.
top_value (float): (series float) Top Value.
bottom_lightness (simple float): (simple float) Optional argument, default = 70. Lightness Percentage. 100% is lightest and 0% is darkest
top_lightness (simple float): (simple float) Optional argument, default = 30. Lightness Percentage. 100% is lightest and 0% is darkest
Returns: (series color) A color Computed a the linear "Lightness" gradient.
saturation_gradient(colour, value, bottom_value, top_value, bottom_saturated, top_saturated)
Determines a color from a "Saturation" gradient, based on the position of an entered value within a defined range.
Parameters:
colour (color): (series color) Pure color.
value (float): (series float) Value.
bottom_value (float): (series float) Bottom Value.
top_value (float): (series float) Top Value.
bottom_saturated (simple float): (simple float) Optional argument, default = 15. Low Saturated Percentage.
top_saturated (simple float): (simple float) Optional argument, default = 80. High Saturated Percentage.
Returns: (series color) A color Computed from a linear "Saturation" gradient.
hue_gradient(colour, value, bottom_value, top_value, bottom_hue, top_hue)
Determines a color from a "Hue" gradient, based on the position of an entered value within a defined range.
Parameters:
colour (color): (series color) Pure color.
value (float): (series float) Value.
bottom_value (float): (series float) Bottom Value.
top_value (float): (series float) Top Value.
bottom_hue (simple float): (simple float) Optional argument, Default = 0. Low Hue is a degree where value in range 0 to 360 degrees.
top_hue (simple float): (simple float) Optional argument, default = 300. High Hue is a degree where value in range 0 to 360 degrees.
Returns: (series color) A color Computed from a linear "Saturation" gradient.
opposColor(colour)
Generates the opposite color of inputted color.
Parameters:
colour (color): (series color) Pure color.
Returns: (series color) An opposite color.
randColor(seed)
Generates a random color.
Parameters:
seed (simple int): (simple int) Optional argument. With identifying seed, it will generate similar color sequence.
Returns: (series color) A random color.
bk_or_wh(colour, lightness)
Determines a white or back fits with an inputted color.
Parameters:
colour (color): (series color) Pure color.
lightness (float): (series float) Optional argument, default = 50. If the lightness percentage of inputted color is higher, the output is white; otherwise, it's black.
Returns: (series color) white or back color.
monochrome(colour, lightness, saturation)
Generates a monochromatic color scheme.
Parameters:
colour (color): (series color) Pure color.
lightness (float): (series float) Optional argument, default = NA. To custom Lightness percentage manually, 100% is lightest and 0% is darkest.
saturation (float): (series float) Optional argument, default = NA. To custom Saturation percentage manually, 100% is highest and 0% is lowest saturated.
Returns: (tuple of two color series) [entered color, monochromatic color].
complementary(colour)
Generates a complementary color scheme.
Parameters:
colour (color): (series color) Pure color.
Returns: (tuple of two color series) [entered color, complementary color].
analogous(colour)
Generates an analogous color scheme.
Parameters:
colour (color): (series color) Pure color.
Returns: (tuple of three color series) [entered color, color2, color3].
triadic(colour)
Generates an Triadic color scheme.
Parameters:
colour (color): (series color) Pure color.
Returns: (tuple of three color series) [entered color, color2, color3].
tetradic(colour)
Generates an Tetradic color scheme.
Parameters:
colour (color): (series color) Main color.
Returns: (tuple of four color series) [entered color, color2, color3, color4].
tst_scheme(colour, size, _type)
Generates an array of requested type (tint, shade, or tone) scheme colors.
Parameters:
colour (simple color): (simple color) Pure color.
size (simple int): (simple input) Number of elements in color array.
_type (simple string): (simple string) Type of color scheme, possible input "tint", "shade", and "tone".
Returns: (simple array<color>) An array contains elements of the requested type scheme colors.
lsh_scheme(colour, size, _type, topLevel, botLevel)
Generates an array of requested type (lightness, saturation or hue) scheme colors.
Parameters:
colour (simple color): (simple color) Pure color.
size (simple int): (simple input) Number of elements in color array.
_type (simple string): (simple string) Type of color scheme, possible input "lightness", "saturation" and "hue".
topLevel (simple float): (simple float) Optional argument, default = NA.
1. if "lightness", in a percentage where value in range 0 to 100, 100% lightest.
2. if "saturation", in a percentage where value in range 0 to 100, 100% highest saturated.
3. if "hue", in a degree where value in range 0 to 360 degrees.
botLevel (simple float): (simple float) Optional argument, default = NA.
1. if "lightness", in a percentage where value in range 0 to 100, 0% darkest.
2. if "saturation", in a percentage where value in range 0 to 100, 0% lowest saturated.
3. if "hue", in a degree where value in range 0 to 360 degrees.
Returns: (simple array<color>) An array contains elements of the requested type scheme colors.
display_color(colour, location)
Displays color including RGB and HSL.
Parameters:
colour (simple color): (simple color) Pure color.
location (simple string): (simple string) Optional argument, default = "top_right". cell location.
Returns: (simple table) A table cell contains RGB and HSL of entered color.
display_scheme(arrayColour, location)
Displays Scheme colors including RGB and HSL.
Parameters:
arrayColour (array<color>)
location (simple string): (simple string) Optional argument, default = "top_right". cell location.
Returns: (simple table) A table cells contain RGB and HSL of entered color.
The ColorLab library presents an essential solution for color optimization, leveraging color terms and philosophy. Through its capabilities, it furnishes the necessary versatility to attain optimal color representation and coherence by integrating functions.
tint_level(colour, level)
Determines a Tinted color
Parameters:
colour (color): (series color) Pure color.
level (float): (series float) Optional argument, default = 50. A level of tent color. 0 is entered color and 100 is white color.
Returns: (series color) A color Computed from a linear "Tint" gradient.
shade_level(colour, level)
Determines a Shaded color.
Parameters:
colour (color): (series color) Pure color.
level (float): (series float) Optional argument, default = 50. A level of tent color. 0 is entered color and 100 is Black color.
Returns: (series color) A color Computed from a linear "Shade" gradient.
tone_level(colour, level)
Determines a Tone color.
Parameters:
colour (color): (series color) Pure color.
level (float): (series float) Optional argument, default = 50. A level of tent color. 0 is entered color and 100 is Gray color.
Returns: (series color) A color Computed from a linear "Tone" gradient.
lightness_gradient(colour, value, bottom_value, top_value, bottom_lightness, top_lightness)
Determines a color from a "Lightness" gradient, based on the position of an entered value within a defined range.
Parameters:
colour (color): (series color) Pure color.
value (float): (series float) Value.
bottom_value (float): (series float) Bottom Value.
top_value (float): (series float) Top Value.
bottom_lightness (simple float): (simple float) Optional argument, default = 70. Lightness Percentage. 100% is lightest and 0% is darkest
top_lightness (simple float): (simple float) Optional argument, default = 30. Lightness Percentage. 100% is lightest and 0% is darkest
Returns: (series color) A color Computed a the linear "Lightness" gradient.
saturation_gradient(colour, value, bottom_value, top_value, bottom_saturated, top_saturated)
Determines a color from a "Saturation" gradient, based on the position of an entered value within a defined range.
Parameters:
colour (color): (series color) Pure color.
value (float): (series float) Value.
bottom_value (float): (series float) Bottom Value.
top_value (float): (series float) Top Value.
bottom_saturated (simple float): (simple float) Optional argument, default = 15. Low Saturated Percentage.
top_saturated (simple float): (simple float) Optional argument, default = 80. High Saturated Percentage.
Returns: (series color) A color Computed from a linear "Saturation" gradient.
hue_gradient(colour, value, bottom_value, top_value, bottom_hue, top_hue)
Determines a color from a "Hue" gradient, based on the position of an entered value within a defined range.
Parameters:
colour (color): (series color) Pure color.
value (float): (series float) Value.
bottom_value (float): (series float) Bottom Value.
top_value (float): (series float) Top Value.
bottom_hue (simple float): (simple float) Optional argument, Default = 0. Low Hue is a degree where value in range 0 to 360 degrees.
top_hue (simple float): (simple float) Optional argument, default = 300. High Hue is a degree where value in range 0 to 360 degrees.
Returns: (series color) A color Computed from a linear "Saturation" gradient.
opposColor(colour)
Generates the opposite color of inputted color.
Parameters:
colour (color): (series color) Pure color.
Returns: (series color) An opposite color.
randColor(seed)
Generates a random color.
Parameters:
seed (simple int): (simple int) Optional argument. With identifying seed, it will generate similar color sequence.
Returns: (series color) A random color.
bk_or_wh(colour, lightness)
Determines a white or back fits with an inputted color.
Parameters:
colour (color): (series color) Pure color.
lightness (float): (series float) Optional argument, default = 50. If the lightness percentage of inputted color is higher, the output is white; otherwise, it's black.
Returns: (series color) white or back color.
monochrome(colour, lightness, saturation)
Generates a monochromatic color scheme.
Parameters:
colour (color): (series color) Pure color.
lightness (float): (series float) Optional argument, default = NA. To custom Lightness percentage manually, 100% is lightest and 0% is darkest.
saturation (float): (series float) Optional argument, default = NA. To custom Saturation percentage manually, 100% is highest and 0% is lowest saturated.
Returns: (tuple of two color series) [entered color, monochromatic color].
complementary(colour)
Generates a complementary color scheme.
Parameters:
colour (color): (series color) Pure color.
Returns: (tuple of two color series) [entered color, complementary color].
analogous(colour)
Generates an analogous color scheme.
Parameters:
colour (color): (series color) Pure color.
Returns: (tuple of three color series) [entered color, color2, color3].
triadic(colour)
Generates an Triadic color scheme.
Parameters:
colour (color): (series color) Pure color.
Returns: (tuple of three color series) [entered color, color2, color3].
tetradic(colour)
Generates an Tetradic color scheme.
Parameters:
colour (color): (series color) Main color.
Returns: (tuple of four color series) [entered color, color2, color3, color4].
tst_scheme(colour, size, _type)
Generates an array of requested type (tint, shade, or tone) scheme colors.
Parameters:
colour (simple color): (simple color) Pure color.
size (simple int): (simple input) Number of elements in color array.
_type (simple string): (simple string) Type of color scheme, possible input "tint", "shade", and "tone".
Returns: (simple array<color>) An array contains elements of the requested type scheme colors.
lsh_scheme(colour, size, _type, topLevel, botLevel)
Generates an array of requested type (lightness, saturation or hue) scheme colors.
Parameters:
colour (simple color): (simple color) Pure color.
size (simple int): (simple input) Number of elements in color array.
_type (simple string): (simple string) Type of color scheme, possible input "lightness", "saturation" and "hue".
topLevel (simple float): (simple float) Optional argument, default = NA.
1. if "lightness", in a percentage where value in range 0 to 100, 100% lightest.
2. if "saturation", in a percentage where value in range 0 to 100, 100% highest saturated.
3. if "hue", in a degree where value in range 0 to 360 degrees.
botLevel (simple float): (simple float) Optional argument, default = NA.
1. if "lightness", in a percentage where value in range 0 to 100, 0% darkest.
2. if "saturation", in a percentage where value in range 0 to 100, 0% lowest saturated.
3. if "hue", in a degree where value in range 0 to 360 degrees.
Returns: (simple array<color>) An array contains elements of the requested type scheme colors.
display_color(colour, location)
Displays color including RGB and HSL.
Parameters:
colour (simple color): (simple color) Pure color.
location (simple string): (simple string) Optional argument, default = "top_right". cell location.
Returns: (simple table) A table cell contains RGB and HSL of entered color.
display_scheme(arrayColour, location)
Displays Scheme colors including RGB and HSL.
Parameters:
arrayColour (array<color>)
location (simple string): (simple string) Optional argument, default = "top_right". cell location.
Returns: (simple table) A table cells contain RGB and HSL of entered color.
파인 라이브러리
진정한 트레이딩뷰 정신에 따라 작성자는 이 파인 코드를 오픈 소스 라이브러리로 공개하여 커뮤니티의 다른 파인 프로그래머들이 재사용할 수 있도록 했습니다. 작성자에게 건배! 이 라이브러리는 개인적으로 또는 다른 오픈 소스 출판물에서 사용할 수 있지만, 출판물에서 이 코드를 재사용하는 것은 하우스 룰의 적용을 받습니다.
Trusted Pine Programmer, For Coding Inquiries
► Website muqwishi.com/home/quotation/
► Telegram t.me/MUQWISHI
► Email service@muqwishi.com
⛾ Support My Work on “Buy Me a Coffee” buymeacoffee.com/muqwishi
► Website muqwishi.com/home/quotation/
► Telegram t.me/MUQWISHI
► Email service@muqwishi.com
⛾ Support My Work on “Buy Me a Coffee” buymeacoffee.com/muqwishi
면책사항
이 정보와 게시물은 TradingView에서 제공하거나 보증하는 금융, 투자, 거래 또는 기타 유형의 조언이나 권고 사항을 의미하거나 구성하지 않습니다. 자세한 내용은 이용 약관을 참고하세요.
파인 라이브러리
진정한 트레이딩뷰 정신에 따라 작성자는 이 파인 코드를 오픈 소스 라이브러리로 공개하여 커뮤니티의 다른 파인 프로그래머들이 재사용할 수 있도록 했습니다. 작성자에게 건배! 이 라이브러리는 개인적으로 또는 다른 오픈 소스 출판물에서 사용할 수 있지만, 출판물에서 이 코드를 재사용하는 것은 하우스 룰의 적용을 받습니다.
Trusted Pine Programmer, For Coding Inquiries
► Website muqwishi.com/home/quotation/
► Telegram t.me/MUQWISHI
► Email service@muqwishi.com
⛾ Support My Work on “Buy Me a Coffee” buymeacoffee.com/muqwishi
► Website muqwishi.com/home/quotation/
► Telegram t.me/MUQWISHI
► Email service@muqwishi.com
⛾ Support My Work on “Buy Me a Coffee” buymeacoffee.com/muqwishi
면책사항
이 정보와 게시물은 TradingView에서 제공하거나 보증하는 금융, 투자, 거래 또는 기타 유형의 조언이나 권고 사항을 의미하거나 구성하지 않습니다. 자세한 내용은 이용 약관을 참고하세요.