GithubHelp home page GithubHelp logo

germanfrelo / vscode-color-info Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mattbierner/vscode-color-info

0.0 0.0 0.0 1.62 MB

VSCode Extension that provides additional information about css colors

Home Page: https://marketplace.visualstudio.com/items?itemName=bierner.color-info

License: MIT License

JavaScript 15.97% TypeScript 84.03%

vscode-color-info's Introduction

VSCode Color Info

Visual Studio Code extension that provides quick information css colors.

fields

About

Color Info adds additional information when you hover over a css color, including:

  • rgb – RGB color values. Enabled by default
  • hsl – HSL color values. Enabled by default
  • css-color-name - Name of the color (red, blue, ...).
  • hsv – HSV color values
  • lab – LAB color values
  • lch – LCHab color values
  • cmyk – CMYK color values. Enabled by default
  • hex – Hex value. Enabled by default
  • alpha – Alpha value. Enabled by default
  • preview – Preview of the color. Displays color with alpha in lower left corner and color without alpha in upper right corner. Enabled by default
  • preview-xl – Larger preview of the color
  • preview-square – Square preview of the color
  • preview-square-xl – Larger square preview of the color

You can customize which of these fields are displayed and the order they are displayed in using the settings described below.

By default, the extension works with any css, sass, scss, or less document and recognizes all basic css color formats, including named colors. You can also enable Color Info in additional file types using the colorInfo.languages setting

Configuration

colorInfo.fields

Ordered array of color fields to display.

fields

colorInfo.excludedFields

Array of fields not to display. Overrides colorInfo.fields. If you only need to exclude one or two of the default fields, using colorInfo.excludedFields is the preferred approach.

excluded fields

colorInfo.languages

Defines which files and languages have color info enabled, and which color types are supported. The default language setting enables all css color values for css, sass, and less documents:

"colorInfo.languages": [
    {
        "selector": "css",
        "colors": "css"
    }, {
        "selector": "sass",
        "colors": "css"
    }, {
        "selector": "scss",
        "colors": "css"
    }, {
        "selector": "less",
        "colors": "css"
    }
]

Each element consists of:

  • "selector" - VSCode document selector.

  • "colors" - String or array of strings defining the types of colors to display information for. Valid values color types are:

    • css - All css color value types
    • hex - Css hex (#ff00ff or #f0f)
    • hex+alpha - Css hex plus alpha (#ff00ff77 or #f0f7)
    • rgb - Css rgb or rgba (rgb(1, 2, 3) or rgba(1, 2, 3, 0.5)) c
    • hsl - Css hsl or hsla (hsl(1, 2, 3) or hsla(1, 2, 3, 0.5))
    • css-colors-names - Css color names (red, blue)

VSCode does not currently support nested languages, so to enable Color Info in an html file, you must add:

{
    "selector": "html",
    "colors": "css"
}

To your colorInfo.languages setting. Make you add this setting to the end of the default colorInfo.languages setting so that you do not disable Color Info for the standard languages.

vscode-color-info's People

Contributors

mattbierner avatar mjbvz avatar 365kim avatar bamurtaugh avatar mgcrea avatar smlombardi avatar dependabot[bot] avatar

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.