Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@adeira/css-colors

Package Overview
Dependencies
Maintainers
4
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@adeira/css-colors - npm Package Compare versions

Comparing version 1.0.0 to 1.1.0

css-colors/CHANGELOG.md

2

css-colors/package.json

@@ -7,3 +7,3 @@ {

"homepage": "https://github.com/adeira/universe/tree/master/src/css-colors",
"version": "1.0.0",
"version": "1.1.0",
"sideEffects": false,

@@ -10,0 +10,0 @@ "private": false,

@@ -32,2 +32,16 @@ Utility functions for working with CSS/HTML colors.

## Is the color bright or dark?
This function can be used to detect whether the color is bright or dark so you can decide whether you should use white or black text for the color background (for example).
```js
import { isDark, isBright } from '@adeira/css-colors';
isDark([0, 0, 0]); // true (it's black)
isBright([0, 0, 0]); // false
isDark([255, 255, 255]); // false (it's white)
isBright([255, 255, 255]); // true
```
## Normalize colors

@@ -34,0 +48,0 @@

@@ -26,2 +26,8 @@ "use strict";

});
Object.defineProperty(exports, "isBright", {
enumerable: true,
get: function get() {
return _isBright.default;
}
});
Object.defineProperty(exports, "isColor", {

@@ -33,2 +39,8 @@ enumerable: true,

});
Object.defineProperty(exports, "isDark", {
enumerable: true,
get: function get() {
return _isDark.default;
}
});
Object.defineProperty(exports, "normalizeColor", {

@@ -47,4 +59,8 @@ enumerable: true,

var _isBright = _interopRequireDefault(require("./isBright"));
var _isColor = _interopRequireDefault(require("./isColor"));
var _isDark = _interopRequireDefault(require("./isDark"));
var _normalizeColor = _interopRequireDefault(require("./normalizeColor"));

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc