kaigouthro

ColorArray

kaigouthro 업데이트됨   
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.
릴리즈 노트:
v2

Big 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.
릴리즈 노트:
v4
Bump library imports, removed demo from code for faster loading, also, hsl option mode (for larger arrays or fewer colors suggested..)

Updated:
makeGradient()
릴리즈 노트:
v5

bumped import to latest
릴리즈 노트:
v6

special 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
릴리즈 노트:
v7

Fixed 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
릴리즈 노트:
v8

updated 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)
    _cols (array)
    _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): 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)
    _th (float)
    _thmax (float)
파인 라이브러리

트레이딩뷰 정신에 따라 오써는 이 파인 코드를 오픈 소스 라이브러리로 퍼블리쉬하여 당사 커뮤니티의 다른 파인 프로그래머들이 쓸 수 있도록 하였습니다. 오써에게 찬사를! 여러분은 이 라이브러리를 프라이빗 또는 오픈 소스 퍼블리케이션에 쓸 수 있지만 퍼블리케이션에 재사용은 하우스룰을 따릅니다.

면책사항

이 정보와 게시물은 TradingView에서 제공하거나 보증하는 금융, 투자, 거래 또는 기타 유형의 조언이나 권고 사항을 의미하거나 구성하지 않습니다. 자세한 내용은 이용 약관을 참고하세요.

이 라이브러리를 쓰시겠습니까?

텍스트를 클립보드에 카피한 뒤 님의 스크립트에 붙여 넣기.