Skip to content

Can't replace hardcoded color values. #25

@nodgear

Description

@nodgear
import ansi from 'ansicolor'

ansi.rgb = {
  black: [25, 30, 43],
  darkGray: [25, 30, 43],
  lightGray: [104, 104, 104],
  white: [199, 199, 199],

  red: [237, 130, 116],
  lightRed: [242, 135, 121],

  green: [166, 204, 112],
  lightGreen: [186, 230, 126],

  yellow: [204, 102, 0],
  lightYellow: [255, 213, 128],

  blue: [109, 203, 250],
  lightBlue: [115, 208, 255],

  magenta: [207, 186, 250],
  lightMagenta: [212, 191, 255],

  cyan: [144, 225, 198],
  lightCyan: [149, 230, 203],
}

the code above will still produce spans with the hardcoded values when using parse(string)
I suspect it's caused due to the parse function initializing a new instance of Colors but i have not investigated enough (yet)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions