Code Monkey home page Code Monkey logo

Comments (5)

inhere avatar inhere commented on August 25, 2024 1

image

HiCyan hex is #68fdfe

color/convert.go

Lines 53 to 91 in 9027b9d

// ---------- basic(16) <=> RGB color convert ----------
// refer from Hyper app
// Tip: only keep foreground color, background color need convert to foreground color for convert to RGB
basic2hexMap = map[uint8]string{
30: "000000", // black
31: "c51e14", // red
32: "1dc121", // green
33: "c7c329", // yellow
34: "0a2fc4", // blue
35: "c839c5", // magenta
36: "20c5c6", // cyan
37: "c7c7c7", // white
// - don't add bg color, convert to fg color for convert to RGB
// 40: "000000", // black
// 41: "c51e14", // red
// 42: "1dc121", // green
// 43: "c7c329", // yellow
// 44: "0a2fc4", // blue
// 45: "c839c5", // magenta
// 46: "20c5c6", // cyan
// 47: "c7c7c7", // white
90: "686868", // lightBlack/darkGray
91: "fd6f6b", // lightRed
92: "67f86f", // lightGreen
93: "fffa72", // lightYellow
94: "6a76fb", // lightBlue
95: "fd7cfc", // lightMagenta
96: "68fdfe", // lightCyan
97: "ffffff", // lightWhite
// - don't add bg color
// 100: "686868", // lightBlack/darkGray
// 101: "fd6f6b", // lightRed
// 102: "67f86f", // lightGreen
// 103: "fffa72", // lightYellow
// 104: "6a76fb", // lightBlue
// 105: "fd7cfc", // lightMagenta
// 106: "68fdfe", // lightCyan
// 107: "ffffff", // lightWhite
}

from color.

inhere avatar inhere commented on August 25, 2024

hi @rew1nter This is a examples:

rgb := color.HiCyan.RGB() // convert to rgb color
rgb.Println("message with rgb color")

rgb := color.HiCyan.ToBg().RGB() // convert to rgb color and as bg color
rgb.Println("message with rgb bg color")

from color.

rew1nter avatar rew1nter commented on August 25, 2024

Hey, I probably failed to explain.

I'm looking for the rgb color code of the color that the text is printed with, upon running this color.HiCyan.Println("text"). I would like to know what HEX code is that cyan.

from color.

rew1nter avatar rew1nter commented on August 25, 2024

image
this is the color I'm talking about. It's definitely not #00FFFF

from color.

rew1nter avatar rew1nter commented on August 25, 2024

Thanks.

from color.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.