https://github.com/dracotmolver/unit-converter
Convert some units used in CSS such as px, pt, %, em, hex and rgb.
https://github.com/dracotmolver/unit-converter
css css-units extension rgb unit-converter visual-studio-code-extension vscode-extension
Last synced: 7 months ago
JSON representation
Convert some units used in CSS such as px, pt, %, em, hex and rgb.
- Host: GitHub
- URL: https://github.com/dracotmolver/unit-converter
- Owner: DracotMolver
- License: mit
- Created: 2016-06-19T22:14:01.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2020-09-30T22:58:14.000Z (about 5 years ago)
- Last Synced: 2025-01-11T02:33:01.204Z (9 months ago)
- Topics: css, css-units, extension, rgb, unit-converter, visual-studio-code-extension, vscode-extension
- Language: JavaScript
- Homepage:
- Size: 2.51 MB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# UnitConverter

[](https://travis-ci.org/DracotMolver/unit-converter)
[](https://marketplace.visualstudio.com/items?itemName=DiegoMolina.unitconverter)
[](https://marketplace.visualstudio.com/items?itemName=DiegoMolina.unitconverter)
[](https://opensource.org/licenses/MIT)
## Just the rights units
Unit converter will work like this:
* From: **px** to **em** and **em** to **px**
* From: **Hex** ('#') to **rgb | rgba** and **rgb | rgba** to **Hex**>**Important:** Don't remove the unit from the text you are selecting on the actived text editor. It's important to know from which unit are you going to convert.
The extension will work too with colors names such as **black**, **white**, **aquamarine**, **yellowgreen** and so on; converting all of them to their hexadecimal value
## How to
* **Setting the value**To use **Unit Converter** you have to press down `F1` and type `unit converter`.
You will get a list of units (**px, em, #, rgb, rgba**). Then, it will appear an input box where you have to type or set the value to convert.
Finally, you will get a promptt with the new value.
* **Selecting the value(s) from the text editor**
There are several ways to select and convert one or more values. To make any of this way to work, you must select the `unit + value`* **One value**

* **Same values (two or more)**
* **Differents Values (Two or more)**
* **From a range of selected text**
