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

@symbo.ls/scratch

Package Overview
Dependencies
Maintainers
4
Versions
261
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@symbo.ls/scratch - npm Package Compare versions

Comparing version 0.3.9 to 0.3.10

2

package.json

@@ -5,3 +5,3 @@ {

"author": "Symbols",
"version": "0.3.9",
"version": "0.3.10",
"files": [

@@ -8,0 +8,0 @@ "src"

@@ -24,25 +24,2 @@ 'use strict'

const setColor = (val, key) => {
const [r, g, b, a = 1] = colorStringToRgbaArray(val.value || val)
const alpha = parseFloat(a.toFixed(2))
const CSSVar = `--color-${key}`
const rgb = `${r}, ${g}, ${b}`
const value = `rgba(${rgb}, ${alpha})`
return {
var: CSSVar,
rgb,
alpha,
value
}
}
const setGradient = (val, key) => {
const CSSVar = `--gradient-${key}`
return {
var: CSSVar,
value: val.value || val
}
}
export const getColor = value => {

@@ -88,2 +65,27 @@ if (!isString(value)) {

const setColor = (val, key) => {
if (val.slice(0, 2) === '--') val = getColor(val.slice(2))
const CSSVar = `--color-${key}`
const [r, g, b, a = 1] = colorStringToRgbaArray(val.value || val)
const alpha = parseFloat(a.toFixed(2))
const rgb = `${r}, ${g}, ${b}`
const value = `rgba(${rgb}, ${alpha})`
return {
var: CSSVar,
rgb,
alpha,
value
}
}
const setGradient = (val, key) => {
const CSSVar = `--gradient-${key}`
return {
var: CSSVar,
value: val.value || val
}
}
const setThemeValue = theme => {

@@ -90,0 +92,0 @@ const value = {}

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