Giter VIP home page Giter VIP logo

Comments (5)

aristath avatar aristath commented on August 25, 2024

What about simply combining the default colorpicker with an opacity slider?
The default colorpicker might not be saving rgba, but converting hex to rgba is pretty easy and we've done it before on https://github.com/shoestrap/shoestrap/blob/c99f63bde78f8c0f4490a4cc3ce56d5f1ba410a0/lib/modules/core/module.php#L7-L28
All that function needs to become rgba is a value from an opacity slider!

from redux-framework.

dovy avatar dovy commented on August 25, 2024

@aristath Good idea. @ghost1227, thoughts?

from redux-framework.

evertiro avatar evertiro commented on August 25, 2024

Not a bad idea, in one way or another this concept will make an appearance in 3.1

from redux-framework.

mekshq avatar mekshq commented on August 25, 2024

Hi,

Here's the function I have created myself to convert hexcodes to RGB or RGBA: http://mekshq.com/how-to-convert-hexadecimal-color-code-to-rgb-or-rgba-using-php/

You can use it if you want of course.

I agree with @aristath.

from redux-framework.

dovy avatar dovy commented on August 25, 2024

@mekshq Just added your code as a validation. Hex to RGBA. You can add this to any color field, just add the argument:

'validation'=>'color_rgba'

I gave you credits in the code. Thanks.

from redux-framework.

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.