Skip to content

Commit b0f3ef8

Browse files
add Material Color swatches
1 parent c199448 commit b0f3ef8

File tree

5 files changed

+869
-411
lines changed

5 files changed

+869
-411
lines changed

README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Jetpack Compose Extended Colors
2+
3+
* Utility library that extends Compose Colors with Material Design2 colors, Color swatches like in
4+
[Flutter](https://api.flutter.dev/flutter/material/Colors-class.html).
5+
6+
* Material Design 3 tonal palette,
7+
see [Material Design 3 site](https://m3.material.io/styles/color/the-color-system/key-colors-tones)
8+
for more information about the Material 3 color system and tonal palettes.
9+
10+
* Rotatable gradients by 45 degrees with aim to add rotation by any angle in the future Utility
11+
12+
* Functions to convert between `androidx.compose.ui.graphics.Color`, HSL, HSV, `RGB`, HCT, and
13+
colors with nearest **Name** based on distance is in 3D space using `Red`, `Green`, `Blue`.

app/src/main/java/com/smarttoolfactory/composecolorsextended/MainActivity.kt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,13 @@ import androidx.compose.material.Surface
99
import androidx.compose.material.Text
1010
import androidx.compose.runtime.Composable
1111
import androidx.compose.ui.Modifier
12+
import androidx.compose.ui.graphics.Color
1213
import androidx.compose.ui.tooling.preview.Preview
1314
import com.smarttoolfactory.composecolorsextended.ui.theme.ComposeColorsExtendedTheme
15+
import com.smarttoolfactory.extendedcolors.MaterialSwatches
1416

1517
class MainActivity : ComponentActivity() {
18+
1619
override fun onCreate(savedInstanceState: Bundle?) {
1720
super.onCreate(savedInstanceState)
1821
setContent {
@@ -22,7 +25,7 @@ class MainActivity : ComponentActivity() {
2225
modifier = Modifier.fillMaxSize(),
2326
color = MaterialTheme.colors.background
2427
) {
25-
Greeting("Android")
28+
2629
}
2730
}
2831
}

0 commit comments

Comments
 (0)