code: function nameToHex(color: string): string {
    if (typeof color !== 'string') return color
    const normalizedColorName = color.toLowerCase()
    return namedColorMap[normalizedColorName]
      ? `#${namedColorMap[normalizedColorName]}`
      : color
  }
docs: Checks if a string is a CSS named color and returns its equivalent hex value, otherwise returns the original color.
  @private