Socket
Socket
Sign inDemoInstall

@ant-design/fast-color

Package Overview
Dependencies
Maintainers
7
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ant-design/fast-color - npm Package Compare versions

Comparing version 2.0.5 to 2.0.6

65

es/FastColor.js

@@ -0,1 +1,2 @@

import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
const round = Math.round;

@@ -47,39 +48,33 @@

export class FastColor {
/**
* All FastColor objects are valid. So isValid is always true. This property is kept to be compatible with TinyColor.
*/
isValid = true;
/**
* Red, R in RGB
*/
r = 0;
/**
* Green, G in RGB
*/
g = 0;
/**
* Blue, B in RGB
*/
b = 0;
/**
* Alpha/Opacity, A in RGBA/HSLA
*/
a = 1;
// HSV privates
_h;
_s;
_l;
_v;
// intermediate variables to calculate HSL/HSV
_max;
_min;
_brightness;
constructor(input) {
/**
* All FastColor objects are valid. So isValid is always true. This property is kept to be compatible with TinyColor.
*/
_defineProperty(this, "isValid", true);
/**
* Red, R in RGB
*/
_defineProperty(this, "r", 0);
/**
* Green, G in RGB
*/
_defineProperty(this, "g", 0);
/**
* Blue, B in RGB
*/
_defineProperty(this, "b", 0);
/**
* Alpha/Opacity, A in RGBA/HSLA
*/
_defineProperty(this, "a", 1);
// HSV privates
_defineProperty(this, "_h", void 0);
_defineProperty(this, "_s", void 0);
_defineProperty(this, "_l", void 0);
_defineProperty(this, "_v", void 0);
// intermediate variables to calculate HSL/HSV
_defineProperty(this, "_max", void 0);
_defineProperty(this, "_min", void 0);
_defineProperty(this, "_brightness", void 0);
/**
* Always check 3 char in the object to determine the format.

@@ -86,0 +81,0 @@ * We not use function in check to save bundle size.

"use strict";
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
Object.defineProperty(exports, "__esModule", {

@@ -7,2 +8,3 @@ value: true

exports.FastColor = void 0;
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
const round = Math.round;

@@ -54,39 +56,33 @@

class FastColor {
/**
* All FastColor objects are valid. So isValid is always true. This property is kept to be compatible with TinyColor.
*/
isValid = true;
/**
* Red, R in RGB
*/
r = 0;
/**
* Green, G in RGB
*/
g = 0;
/**
* Blue, B in RGB
*/
b = 0;
/**
* Alpha/Opacity, A in RGBA/HSLA
*/
a = 1;
// HSV privates
_h;
_s;
_l;
_v;
// intermediate variables to calculate HSL/HSV
_max;
_min;
_brightness;
constructor(input) {
/**
* All FastColor objects are valid. So isValid is always true. This property is kept to be compatible with TinyColor.
*/
(0, _defineProperty2.default)(this, "isValid", true);
/**
* Red, R in RGB
*/
(0, _defineProperty2.default)(this, "r", 0);
/**
* Green, G in RGB
*/
(0, _defineProperty2.default)(this, "g", 0);
/**
* Blue, B in RGB
*/
(0, _defineProperty2.default)(this, "b", 0);
/**
* Alpha/Opacity, A in RGBA/HSLA
*/
(0, _defineProperty2.default)(this, "a", 1);
// HSV privates
(0, _defineProperty2.default)(this, "_h", void 0);
(0, _defineProperty2.default)(this, "_s", void 0);
(0, _defineProperty2.default)(this, "_l", void 0);
(0, _defineProperty2.default)(this, "_v", void 0);
// intermediate variables to calculate HSL/HSV
(0, _defineProperty2.default)(this, "_max", void 0);
(0, _defineProperty2.default)(this, "_min", void 0);
(0, _defineProperty2.default)(this, "_brightness", void 0);
/**
* Always check 3 char in the object to determine the format.

@@ -93,0 +89,0 @@ * We not use function in check to save bundle size.

{
"name": "@ant-design/fast-color",
"version": "2.0.5",
"version": "2.0.6",
"description": "fast and small color class",

@@ -49,3 +49,3 @@ "keywords": [

"@types/jest": "^29.5.12",
"@types/node": "^20.14.2",
"@types/node": "^22.1.0",
"@umijs/fabric": "^4.0.1",

@@ -52,0 +52,0 @@ "color2k": "^2.0.3",

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