PINE LIBRARY
ColorGradient

Library "ColorGradient"
Library for creating color gradients and palettes with hex colors
hexToColor(hexStr)
hexToColor
Parameters:
hexStr (string): Hex color string (e.g., "#FF0000" or "FF0000")
Returns: color value
gradientStep(color1, color2, steps, step)
gradientStep
Parameters:
color1 (string): Starting color (hex string)
color2 (string): Ending color (hex string)
steps (int): Number of steps including start and end
step (int): Current step (0 to steps-1)
Returns: Interpolated color
multiGradientStep(colors, totalSteps, step)
multiGradientStep
Parameters:
colors (array<string>): Array of hex color strings
totalSteps (int): Total number of steps across all colors
step (int): Current step (0 to totalSteps-1)
Returns: Interpolated color
applyPaletteStyle(hexStr, style)
applyPaletteStyle
Parameters:
hexStr (string): Hex color string
style (string): "normal", "pale", "pastel", "bright", "matte"
Returns: Adjusted color
getStyledGradient(colors, totalSteps, step, style)
getStyledGradient
Parameters:
colors (array<string>): Array of hex color strings
totalSteps (int): Total number of steps
step (int): Current step
style (string): Palette style ("normal", "pale", "pastel", "bright", "matte")
Returns: Styled color
Library for creating color gradients and palettes with hex colors
hexToColor(hexStr)
hexToColor
Parameters:
hexStr (string): Hex color string (e.g., "#FF0000" or "FF0000")
Returns: color value
gradientStep(color1, color2, steps, step)
gradientStep
Parameters:
color1 (string): Starting color (hex string)
color2 (string): Ending color (hex string)
steps (int): Number of steps including start and end
step (int): Current step (0 to steps-1)
Returns: Interpolated color
multiGradientStep(colors, totalSteps, step)
multiGradientStep
Parameters:
colors (array<string>): Array of hex color strings
totalSteps (int): Total number of steps across all colors
step (int): Current step (0 to totalSteps-1)
Returns: Interpolated color
applyPaletteStyle(hexStr, style)
applyPaletteStyle
Parameters:
hexStr (string): Hex color string
style (string): "normal", "pale", "pastel", "bright", "matte"
Returns: Adjusted color
getStyledGradient(colors, totalSteps, step, style)
getStyledGradient
Parameters:
colors (array<string>): Array of hex color strings
totalSteps (int): Total number of steps
step (int): Current step
style (string): Palette style ("normal", "pale", "pastel", "bright", "matte")
Returns: Styled color
Biblioteca Pine
Fiel al espíritu de TradingView, el autor ha publicado este código de Pine como biblioteca de código abierto, para que otros programadores de nuestra comunidad puedan reutilizarlo. ¡Enhorabuena al autor! Puede usar esta biblioteca de forma privada o en otras publicaciones de código abierto, pero su reutilización en publicaciones está sujeta a nuestras Normas internas.
Exención de responsabilidad
La información y las publicaciones no constituyen, ni deben considerarse como, asesoramiento o recomendaciones financieras, de inversión, de trading u otro tipo, proporcionadas o respaldadas por TradingView. Obtenga más información en Condiciones de uso.
Biblioteca Pine
Fiel al espíritu de TradingView, el autor ha publicado este código de Pine como biblioteca de código abierto, para que otros programadores de nuestra comunidad puedan reutilizarlo. ¡Enhorabuena al autor! Puede usar esta biblioteca de forma privada o en otras publicaciones de código abierto, pero su reutilización en publicaciones está sujeta a nuestras Normas internas.
Exención de responsabilidad
La información y las publicaciones no constituyen, ni deben considerarse como, asesoramiento o recomendaciones financieras, de inversión, de trading u otro tipo, proporcionadas o respaldadas por TradingView. Obtenga más información en Condiciones de uso.