How to use Photoshop color code with Color class in Flutter

I love color pallet of photoshop and do miss them in Android studio. Google should think about the pallet plugin.

I search the market place and not find anything can help with color pallet. I figure out how I can use those photoshop color code with Flutter, the Color class

The class that make colors

The Color class can generate color I want, the problem is that photoshop bring me color code as string of alphabets and Color class only accepting the integer value.

To use it with the class I have to prefix 0xFF which defines the full opacity and it make up the Integer value.

const color = const Color(0xFFB74093);

and it just do work.

Published by


A developer,teacher and a blogger obsessed with Python,Dart and open source world from India

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.