This plugin draws colors on editor's gutter and code completion popup. You can modify them by clicking on the icons in the gutter
It works with androidx.compose.ui.graphics.Color
from
Jetpack Compose or
Compose Multiplatform
- Show preview in code completion popup for simple constant fields
- Show preview in places simple constant fields usage with type
Color
- Show preview for results of
compositeOver
,copy
,convert
andlerp
functions - Show preview in
Color
creation places- ULong constructor
- Long function "constructor"
- Int function "constructor"
- Int x3 function "constructor"
- Float x3 function "constructor"
- Float x3 with color scheme function "constructor"
- Float x4 function "constructor"
- Float x4 with color scheme function "constructor"
- hsl "constructor"
- hsv "constructor"
- Show palette by clicking on preview to change color
- Change color with saving original numeral system
Install it from the Jetbrains plugin repository within your IDE (recommended):
- Settings/Preferences > Plugins > Marketplace > Search 'Compose Color Preview'
You can also download the JAR package from the Jetbrains plugin repository or from GitHub Releases and add it manually to your plugins:
- Settings/Preferences > Plugins > ⚙️ > Install plugin from disk...
I have a duplicate preview in the color declaration line in Android Studio. How to fix it?
You can simply disable one of the previews. Go to Settings/Preferences > Editor > General > Gutter Icons and disable "Compose color picker" from "Jetpack compose" section or "Color chooser" from "Compose Color Preview" section
Starting from IDEA 2024.1 colors list order in popup is reversed. Can you fix it?
Unfortunately, no. It's Intellij IDEA Platform bug and the issue is created. So we can only wait for a fix from JetBrains
Hex in color picker have wrong pattern. Can you fix it?
Yes, but it requires a complete rewrite of the color picker popup which is not what I want to do. A request for this feature has been submitted to JetBrains, and we need to wait for a reaction
Contributions are welcome. Please check CONTRIBUTING.md for more information.
Besides source code contributions, feel free to open bug reports or just suggest new features here.
Copyright 2023-2024 Peter Gulko (zTrap)
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.