PINE LIBRARY
已更新 ColorArray

Library "ColorArray"
Simple color array gradient tool.
makeGradient(size, _col1, _col2, _col3, _col4, _col5) Color Gradient Array from 5 colors.
Parameters:
size: : default 10
_col1: : default #ff0000
_col2: : default #ffff00
_col3: : default #00ff00
_col4: : default #00ffff
_col5: : default #0000ff
Returns: array of colors to specified size.
Simple color array gradient tool.
makeGradient(size, _col1, _col2, _col3, _col4, _col5) Color Gradient Array from 5 colors.
Parameters:
size: : default 10
_col1: : default #ff0000
_col2: : default #ffff00
_col3: : default #00ff00
_col4: : default #00ffff
_col5: : default #0000ff
Returns: array of colors to specified size.
發行說明
v2Big update: no Limitation on color number now. anywhere from 2-10 is automatic, any more than 10 colors, Input an array.
backwards compatible with old version.
Enjoy!
Updated:
makeGradient()
發行說明
v3 HSV gradient UPGRADE.. MUCH nicer fades.
發行說明
v4Bump library imports, removed demo from code for faster loading, also, hsl option mode (for larger arrays or fewer colors suggested..)
Updated:
makeGradient()
發行說明
v5bumped import to latest
發行說明
v6special tool for double gradients based off of being above/below threshold.
neutral point, first level, second level, then when it' peaks at ath or atl.
Added:
fade(_src, _mid, _colsin, _th, _thmax)
Multiple Color Fader (Negative Limit, Negative strong, Negative mild, neutral, Positive mild, Positive strong, Positive limit)
Parameters:
_src: (float ) input value to follow
_mid: (float ) midpoint ( 0 for osc)
_colsin: (color[] ) colors to generate the fades
_th: (float ) 0-1,threshold to first level
_thmax: (float ) 0-1,threshold to second level
Returns: color output
發行說明
v7Fixed problem on Fade, added Focus, Give itt a try :)
Updated:
fade(_source, _mid, _colsin, _th, _thmax)
Multiple Color Fader (Negative Limit, Negative strong, Negative mild, neutral, Positive mild, Positive strong, Positive limit)
Parameters:
_source: (float ) input value to follow
_mid: (float ) midpoint ( 0 for osc)
_colsin: (color[] ) colors to generate the fades
_th: (float ) 0-1,threshold to first level
_thmax: (float ) 0-1,threshold to second level
Returns: color output
發行說明
v8updated hsvcol import (its way faster now.. ~ 3-5 times quicker)
Added:
focus(_source, _values, _cols, _mode)
Focus color to an array position
Parameters:
_source (float): (float)
_values (array<float>): (float[])
_cols (array<color>)
_mode (bool): (bool) Optional color from array val
Returns: Color array with focused color
Updated:
makeGradient(size, _array, _mode)
Color Gradient for Two through ~any~ amount of colors
(1-10 input colors, any more, use an array of cols as input)
Parameters:
size (int)
_array (array<color>): Your own color array (no size limit)
_mode (bool): Switch to Alt HSL mode (i highly suggest fewer colors and larger size for this mode.)
fade(_source, _mid, _colsin, _th, _thmax)
Multiple Color Fader (Negative Limit, Negative strong, Negative mild, neutral, Positive mild, Positive strong, Positive limit)
// param _src (float ) input value to follow
// param _mid (float ) midpoint ( 0 for osc)
// param _colsin (color[] ) colors to generate the fades
// param _th (float ) 0-1,threshold to first level
// param _thmax (float ) 0-1,threshold to second level
// Returns color output
Parameters:
_source (float)
_mid (float)
_colsin (array<color>)
_th (float)
_thmax (float)
發行說明
v9updated a glitch in anysize.. v6 soon will need you to update your scripts to 6 to use it. las v5 here.
發行說明
v10發行說明
v11Pine腳本庫
秉持 TradingView 一貫的共享精神,作者將此 Pine 程式碼發佈為開源庫,讓社群中的其他 Pine 程式設計師能夠重複使用。向作者致敬!您可以在私人專案或其他開源發佈中使用此庫,但在公開發佈中重複使用該程式碼需遵守社群規範。
免責聲明
這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。
Pine腳本庫
秉持 TradingView 一貫的共享精神,作者將此 Pine 程式碼發佈為開源庫,讓社群中的其他 Pine 程式設計師能夠重複使用。向作者致敬!您可以在私人專案或其他開源發佈中使用此庫,但在公開發佈中重複使用該程式碼需遵守社群規範。
免責聲明
這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。