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

@antv/g-svg

Package Overview
Dependencies
Maintainers
16
Versions
307
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@antv/g-svg

A canvas library which providing 2d

  • 0.1.0-beta.3
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
115K
increased by7.8%
Maintainers
16
Weekly downloads
 
Created
Source

color-util

antv 开发的轻量级工具方法库。

安装下载

tnpm i --save @antv/util

// 所有的 api 是都这么引入,名字不同而已
import { gradient } from '@antv/color-util';

const grad = gradient(['red', 'blue']);
const color1 = grad(0.1);
const color2 = grad(0.2);

API 文档

目前使用到的、且推荐使用的 API 文档,不在文档内的不建议使用。

  • rgb2arr('#ffeedd') 将 rgb 转换成 16 进制的数组
  • gradient(colors) : 'Function' 渐变色计算
    • colors : 颜色的数组,例如 ['red', 'blue']
    • 返回值是一个函数,可以传入百分百,返回函数
const grad = gradient(['red', 'blue']);
const color1 = grad(0.1);
const color2 = grad(0.2);
  • toRGB(color) : 将颜色转换成 RGB 的格式
import { toRGB } from '@antv/color-util';
toRGB('red');
toRGB('rgb(240, 240, 233)');

Keywords

FAQs

Package last updated on 12 Oct 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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