View Source Idmlx.Components.Color (idmlx v0.2.1)

Represents a color in an InDesign document.

This module provides functionality for handling color definitions and conversions between different color spaces (CMYK, RGB, HEX).

Color Spaces

  • CMYK: Used for print documents
  • RGB: Used for digital/screen documents
  • HEX: Web color format (converted to appropriate space)

Examples

%Idmlx.Components.Color{
  name: "CustomBlue",
  model: "Process",
  space: "CMYK",
  color_value: "100 50 0 0"
}

Summary

Functions

Returns hexadecimal value for predefined colors.

Types

t()

@type t() :: %Idmlx.Components.Color{
  color_value: String.t(),
  model: String.t(),
  name: String.t(),
  space: String.t()
}

Functions

to_hex(arg1)

@spec to_hex(%Idmlx.Components.Color{
  color_value: String.t(),
  model: term(),
  name: term(),
  space: String.t()
}) :: String.t()
@spec to_hex(%Idmlx.Components.Color{
  color_value: String.t(),
  model: term(),
  name: term(),
  space: String.t()
}) :: String.t()
@spec to_hex(%Idmlx.Components.Color{
  color_value: term(),
  model: term(),
  name: String.t(),
  space: term()
}) :: String.t()

Returns hexadecimal value for predefined colors.