> ## Documentation Index
> Fetch the complete documentation index at: https://takeprofit.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Package indie.color

Package for builtin colors and the `rgba` and `hex` functions.

> [!NOTE]
>
> See also: [`@line()`](https://takeprofit.com/docs/indie/Library-reference/package-indie-plot#decor_line)[`Line`](https://takeprofit.com/docs/indie/Library-reference/package-indie-plot#class_Line)[`Color`](https://takeprofit.com/docs/indie/Library-reference/package-indie#class_Color)

***

## Variables

**1. Constants**

[Navigate to const\_AQUA](#const_AQUA)

AQUA

indie.Color

Built-in color.

[Navigate to const\_BLACK](#const_BLACK)

BLACK

indie.Color

Built-in color.

[Navigate to const\_BLUE](#const_BLUE)

BLUE

indie.Color

Built-in color.

[Navigate to const\_BROWN](#const_BROWN)

BROWN

indie.Color

Built-in color.

[Navigate to const\_FUCHSIA](#const_FUCHSIA)

FUCHSIA

indie.Color

Built-in color.

[Navigate to const\_GRAY](#const_GRAY)

GRAY

indie.Color

Built-in color.

[Navigate to const\_GREEN](#const_GREEN)

GREEN

indie.Color

Built-in color.

[Navigate to const\_LIME](#const_LIME)

LIME

indie.Color

Built-in color.

[Navigate to const\_MAROON](#const_MAROON)

MAROON

indie.Color

Built-in color.

[Navigate to const\_NAVY](#const_NAVY)

NAVY

indie.Color

Built-in color.

[Navigate to const\_OLIVE](#const_OLIVE)

OLIVE

indie.Color

Built-in color.

[Navigate to const\_ORANGE](#const_ORANGE)

ORANGE

indie.Color

Built-in color.

[Navigate to const\_PINK](#const_PINK)

PINK

indie.Color

Built-in color.

[Navigate to const\_PURPLE](#const_PURPLE)

PURPLE

indie.Color

Built-in color.

[Navigate to const\_RED](#const_RED)

RED

indie.Color

Built-in color.

[Navigate to const\_SILVER](#const_SILVER)

SILVER

indie.Color

Built-in color.

[Navigate to const\_TEAL](#const_TEAL)

TEAL

indie.Color

Built-in color.

[Navigate to const\_TRANSPARENT](#const_TRANSPARENT)

TRANSPARENT

indie.Color

Alias of `rgba(0, 0, 0, 0.0)`. Can be useful for setting a transparent color.

[Navigate to const\_WHITE](#const_WHITE)

WHITE

indie.Color

Built-in color.

[Navigate to const\_YELLOW](#const_YELLOW)

YELLOW

indie.Color

Built-in color.

***

## Functions

### `hex()`

*function*

**1. Overloads**

hex

(value) -> indie.Color

Creates a fully opaque `Color` object from a hex string in `#RRGGBB` format. Letters can be upper or lower case.

**parameters info**

value

str

required

Color as `#RRGGBB`, for example `'#1E90FF'`. Other forms — shorthand `#RGB`, eight-digit `#RRGGBBAA`, or a string without `#` — compile, but stop the indicator at runtime with `invalid hex color: expected #RRGGBB`.

```py Example theme={null}
@param.color('line_color', default=color.hex('#1E90FF'))
def Main(self, line_color):
    # Use line_color variable...
```

> [!NOTE]
>
> To make a hex color transparent, call it with an alpha value: `color.hex('#1E90FF')(0.3)`.

***

### `rgba()`

*function*

**1. Overloads**

rgba

(red, green, blue, alpha) -> indie.Color

Creates a `Color` object by its RGB components and alpha channel.

**parameters info**

red

int

required

Red component of color.

green

int

required

Green component of color.

blue

int

required

Blue component of color.

alpha

float

default:
1.0

Alpha channel (component) of color which ranges from `0.0` (fully transparent) to `1.0` (fully opaque).

***


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.