Code Monkey home page Code Monkey logo

Comments (6)

igorjacauna avatar igorjacauna commented on May 20, 2024 1

Maybe using https://github.com/unjs/theme-colors?

from pinceau.

SGAMERyu avatar SGAMERyu commented on May 20, 2024

Hi,

I'm using Pinceau through Docus and from v1.8.x to v1.9.x, the palette function disappeared. How can I convert my code?

import { defineTheme, palette } from 'pinceau'

export default defineTheme({
  color: {
    primary: palette('orange')
  }
})

In the new version, Pinceau has removed the util export of the palette. You can refer to https://github.com/Tahul/pinceau/blob/6f92a673469cb71f8af3530e75015cc14b56b533/src/utils/palette.ts for the usage of token design.

I guess the author's @Tahul initial design was probably intended to validate a portion of the design and the implemented utility functions, which may not be part of the official API provided by Pinceau.

from pinceau.

esoubiran-aneo avatar esoubiran-aneo commented on May 20, 2024

Yes, I replace it with

export default defineTheme({
  color: {
    primary: {
      50: '#fff7ed',
      100: '#ffedd5',
      200: '#fed7aa',
      300: '#fdba74',
      400: '#fb923c',
      500: '#f97316',
      600: '#ea580c',
      700: '#c2410c',
      800: '#9a3412',
      900: '#7c2d12',
    }
  }
})

But more documentation about this could be awesome

from pinceau.

Barbapapazes avatar Barbapapazes commented on May 20, 2024

Whoo thanks 👀

from pinceau.

igorjacauna avatar igorjacauna commented on May 20, 2024

Another approach: https://github.com/nuxt-modules/design-tokens/blob/main/src/palette.ts

from pinceau.

esoubiran-aneo avatar esoubiran-aneo commented on May 20, 2024

The question have now an anwser.

from pinceau.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.