@brightlayer-ui/colors

中文文档
3.3.0发布于 2026/10/15BSD-3-ClauseTypeScriptCommonJS近 30 天下载 3.5万

Brightlayer UI colors for Eaton applications

原始使用文档
文档目录4 节
  1. Installation
  2. Usage
  3. Angular or Ionic
  4. React or React Native

Brightlayer UI Colors

This package contains Brightlayer UI color definitions. These are intended for use as primary UI colors.

It contains the following color defintions:

blue / $blui-blue
white / $blui-white
gray / $blui-gray
black / $blui-black
darkBlack / $blui-darkBlack
red / $blui-red
orange / $blui-orange
gold / $blui-gold
yellow / $blui-yellow
green / $blui-green
lightBlue / $blui-lightBlue
purple / $blui-purple

These all have color definitions for the following values: 50, 100, 200, 300, 400, 500, 600, 700, 800, 900.

Installation

Install with npm

npm install --save @brightlayer-ui/colors

or yarn

yarn add @brightlayer-ui/colors

Usage

Incorporating these colors into your project is handled differently depending on the framework that you are using.

Angular or Ionic

// in styles.scss or your top-level sass file
@import '~@brightlayer-ui/colors/palette.scss'
...
background-color: map-get($blui-blue, 500)

React or React Native

import * as Colors from '@brightlayer-ui/colors';
...
<div style={{background: Colors.blue['500']}}/>

版本与发布记录

@brightlayer-ui/colors 共发布 26 个版本,首次发布于 2021/10/20;过去 12 个月发布了 10 个版本。

版本发布日期距今
3.3.0latest2026/10/1524 天前
3.3.0-alpha.1alpha2026/08/182 个月前
3.3.0-alpha.02026/08/172 个月前
3.2.1-alpha.02026/08/102 个月前
3.2.02026/07/203 个月前
3.2.0-alpha.42026/05/285 个月前

其他发布通道:beta → 3.1.1-beta.2,alpha → 3.3.0-alpha.1。

关于 @brightlayer-ui/colors 的常见问题

@brightlayer-ui/colors 是什么?

Brightlayer UI colors for Eaton applications

如何安装 @brightlayer-ui/colors?

在项目目录运行 npm install @brightlayer-ui/colors,或使用 pnpm add / yarn add / bun add。

@brightlayer-ui/colors 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@brightlayer-ui/colors 支持 ESM 还是 CommonJS?

以 CommonJS 形式发布,可以直接 require();在 ES Module 项目中也可以用 import 引入(Node.js 会把 module.exports 作为默认导出)。

@brightlayer-ui/colors 可以商用吗?

@brightlayer-ui/colors 使用 BSD-3-Clause 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。另外不得用原作者名义为衍生产品背书。以上为概括,不构成法律意见,请以许可原文为准。

@brightlayer-ui/colors 的下载量有多少?

根据 npm 官方下载统计,@brightlayer-ui/colors 在 2026/10/09 – 2026/11/07 这 30 天内被下载 35,381 次,日均约 1,179 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@brightlayer-ui/colors 还在维护吗?

最新版本 3.3.0 发布于 2026/10/15(24 天前);至今共发布 26 个版本,其中过去 12 个月发布了 10 个;首次发布于 2021/10/20。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。