Android Studio Arctic Fox Canary 7 has this functionality built-in!
A plugin for Intellij based IDEs to draw rectangle on the editor's gutter denoting the color represented by androidx.compose.ui.graphics.Color
Clicking on the color icon from the gutter will open a color picker dialog to modify the color.
Only the properties satisfying the following pattern will be highlighted:
$modifier $name = Color($int)
- Color(0XFF000000) // Not supported
+ val black = Color(0XFF000000)
<>
<>
-
Using IDE built-in plugin system:
Preferences > Plugins > Marketplace > Search for "Highlight Colors for Compose" > Install Plugin
-
Manually:
Download the latest release and install it manually using Preferences > Plugins > ⚙️ > Install plugin from disk...
Copyright 2020 Kaustubh Patange
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.