color

Color manipulation utilities for converting between color formats and generating color gradients.

Functions

Function
Description
Example

hex

Converts a number (0-255) to hexadecimal

dphelper.color.hex(255)

toHex

Converts RGB array to hex string

dphelper.color.toHex([255, 128, 0])

toRGB

Converts hex string to RGB array

dphelper.color.toRGB('#ff8000')

oleColor

Converts hex to OLE color format

dphelper.color.oleColor('#ffffff')

gradient

Generates gradient between two colors

dphelper.color.gradient('#ff0000', '#0000ff', 10)

Description

Comprehensive color manipulation tools:

  • Format Conversion - RGB ↔ Hex, OLE color format

  • Gradient Generation - Create smooth color transitions

  • Number Formatting - Convert color values to hex

Usage Examples

Number to Hex

RGB to Hex Conversion

Hex to RGB Conversion

OLE Color Conversion

Gradient Generation

Advanced Usage

Color Utilities Class

Dynamic Chart Colors

Details

  • Author: Dario Passariello

  • Version: 0.0.2

  • Creation Date: 20210101

  • Last Modified: 20260220

  • Environment: Client-side only (browser)


Automatically generated document

Last updated