包详细信息

@ducor/color

ducorui422UNLICENSED5.2.0

A utility package for managing and applying color styles, including background, border, ring, and text colors, with TypeScript support.

color, ducor, theme

自述文件

@ducor/color

Overview

The @ducor/color package provides utilities for managing and applying color styles in your projects. It includes functions and types to handle background, border, ring, and text colors, among others.

Installation

To install the package, use the following command:

pnpm add @ducor/color

Features

  • Background Colors: Utilities for setting background colors.
  • Border Colors: Utilities for setting border colors.
  • Ring Colors: Utilities for setting ring colors.
  • Text Colors: Utilities for setting text colors.
  • Type Definitions: Includes TypeScript types for better development experience.

Usage

Import the utilities you need from the package:

import { bg, border, ring, text } from "@ducor/color";

// Example usage
const backgroundColor = bg("primary");
const borderColor = border("secondary");
const ringColor = ring("accent");
const textColor = text("muted");

Development

Scripts

  • Build: Run the build process for the package.
  • Test: Execute tests to ensure functionality.

Folder Structure

  • src/: Contains the source code for the package.
    • bg.ts: Background color utilities.
    • border.ts: Border color utilities.
    • ring.ts: Ring color utilities.
    • text.ts: Text color utilities.
    • types.ts: Type definitions.

Contributing

Contributions are welcome! Please follow the guidelines in the main repository's CONTRIBUTING.md file.

License

This package is licensed under the MIT License. See the LICENSE file for more details.