Skip to content

Commit

Permalink
Generate android semantic colors (#85)
Browse files Browse the repository at this point in the history
* Git ignore IntelliJ folder.

* Generate SemanticColors objects for Android
  • Loading branch information
bmarty authored Jul 4, 2024
1 parent 15f2f1a commit df53a1a
Show file tree
Hide file tree
Showing 7 changed files with 514 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,5 @@ node_modules
storybook-static

.swiftpm/

.idea
105 changes: 105 additions & 0 deletions assets/android/src/SemanticColorsDark.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
/*
* Copyright (c) 2024 New Vector Ltd
*
* 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
*
* http://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.
*/
/**
* !!! WARNING !!!
*
* THIS IS AN AUTOGENERATED FILE.
* DO NOT EDIT MANUALLY.
*/



@file:Suppress("all")
package io.element.android.compound.tokens.generated

import io.element.android.compound.annotations.CoreColorToken
import io.element.android.compound.tokens.generated.internal.DarkColorTokens

/**
* Semantic colors for the dark Compound theme.
*/
@OptIn(CoreColorToken::class)
val compoundColorsDark = SemanticColors(
bgAccentHovered = DarkColorTokens.colorGreen1000,
bgAccentPressed = DarkColorTokens.colorGreen1100,
bgAccentRest = DarkColorTokens.colorGreen900,
bgActionPrimaryDisabled = DarkColorTokens.colorGray700,
bgActionPrimaryHovered = DarkColorTokens.colorGray1200,
bgActionPrimaryPressed = DarkColorTokens.colorGray1100,
bgActionPrimaryRest = DarkColorTokens.colorGray1400,
bgActionSecondaryHovered = DarkColorTokens.colorAlphaGray200,
bgActionSecondaryPressed = DarkColorTokens.colorAlphaGray300,
bgActionSecondaryRest = DarkColorTokens.colorThemeBg,
bgCanvasDefault = DarkColorTokens.colorThemeBg,
bgCanvasDisabled = DarkColorTokens.colorGray200,
bgCriticalHovered = DarkColorTokens.colorRed1000,
bgCriticalPrimary = DarkColorTokens.colorRed900,
bgCriticalSubtle = DarkColorTokens.colorRed200,
bgCriticalSubtleHovered = DarkColorTokens.colorRed300,
bgDecorative1 = DarkColorTokens.colorLime300,
bgDecorative2 = DarkColorTokens.colorCyan300,
bgDecorative3 = DarkColorTokens.colorFuchsia300,
bgDecorative4 = DarkColorTokens.colorPurple300,
bgDecorative5 = DarkColorTokens.colorPink300,
bgDecorative6 = DarkColorTokens.colorOrange300,
bgInfoSubtle = DarkColorTokens.colorBlue200,
bgSubtlePrimary = DarkColorTokens.colorGray400,
bgSubtleSecondary = DarkColorTokens.colorGray300,
bgSuccessSubtle = DarkColorTokens.colorGreen200,
borderCriticalHovered = DarkColorTokens.colorRed1000,
borderCriticalPrimary = DarkColorTokens.colorRed900,
borderCriticalSubtle = DarkColorTokens.colorRed500,
borderDisabled = DarkColorTokens.colorGray500,
borderFocused = DarkColorTokens.colorBlue900,
borderInfoSubtle = DarkColorTokens.colorBlue500,
borderInteractiveHovered = DarkColorTokens.colorGray1100,
borderInteractivePrimary = DarkColorTokens.colorGray800,
borderInteractiveSecondary = DarkColorTokens.colorGray600,
borderSuccessSubtle = DarkColorTokens.colorGreen500,
iconAccentPrimary = DarkColorTokens.colorGreen900,
iconAccentTertiary = DarkColorTokens.colorGreen800,
iconCriticalPrimary = DarkColorTokens.colorRed900,
iconDisabled = DarkColorTokens.colorGray700,
iconInfoPrimary = DarkColorTokens.colorBlue900,
iconOnSolidPrimary = DarkColorTokens.colorThemeBg,
iconPrimary = DarkColorTokens.colorGray1400,
iconPrimaryAlpha = DarkColorTokens.colorAlphaGray1400,
iconQuaternary = DarkColorTokens.colorGray700,
iconQuaternaryAlpha = DarkColorTokens.colorAlphaGray700,
iconSecondary = DarkColorTokens.colorGray900,
iconSecondaryAlpha = DarkColorTokens.colorAlphaGray900,
iconSuccessPrimary = DarkColorTokens.colorGreen900,
iconTertiary = DarkColorTokens.colorGray800,
iconTertiaryAlpha = DarkColorTokens.colorAlphaGray800,
textActionAccent = DarkColorTokens.colorGreen900,
textActionPrimary = DarkColorTokens.colorGray1400,
textCriticalPrimary = DarkColorTokens.colorRed900,
textDecorative1 = DarkColorTokens.colorLime1100,
textDecorative2 = DarkColorTokens.colorCyan1100,
textDecorative3 = DarkColorTokens.colorFuchsia1100,
textDecorative4 = DarkColorTokens.colorPurple1100,
textDecorative5 = DarkColorTokens.colorPink1100,
textDecorative6 = DarkColorTokens.colorOrange1100,
textDisabled = DarkColorTokens.colorGray800,
textInfoPrimary = DarkColorTokens.colorBlue900,
textLinkExternal = DarkColorTokens.colorBlue900,
textOnSolidPrimary = DarkColorTokens.colorThemeBg,
textPlaceholder = DarkColorTokens.colorGray800,
textPrimary = DarkColorTokens.colorGray1400,
textSecondary = DarkColorTokens.colorGray900,
textSuccessPrimary = DarkColorTokens.colorGreen900,
isLight = false,
)
105 changes: 105 additions & 0 deletions assets/android/src/SemanticColorsDarkHc.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
/*
* Copyright (c) 2024 New Vector Ltd
*
* 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
*
* http://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.
*/
/**
* !!! WARNING !!!
*
* THIS IS AN AUTOGENERATED FILE.
* DO NOT EDIT MANUALLY.
*/



@file:Suppress("all")
package io.element.android.compound.tokens.generated

import io.element.android.compound.annotations.CoreColorToken
import io.element.android.compound.tokens.generated.internal.DarkHcColorTokens

/**
* Semantic colors for the high contrast dark Compound theme.
*/
@OptIn(CoreColorToken::class)
val compoundColorsHcDark = SemanticColors(
bgAccentHovered = DarkHcColorTokens.colorGreen1000,
bgAccentPressed = DarkHcColorTokens.colorGreen1100,
bgAccentRest = DarkHcColorTokens.colorGreen900,
bgActionPrimaryDisabled = DarkHcColorTokens.colorGray700,
bgActionPrimaryHovered = DarkHcColorTokens.colorGray1200,
bgActionPrimaryPressed = DarkHcColorTokens.colorGray1100,
bgActionPrimaryRest = DarkHcColorTokens.colorGray1400,
bgActionSecondaryHovered = DarkHcColorTokens.colorAlphaGray200,
bgActionSecondaryPressed = DarkHcColorTokens.colorAlphaGray300,
bgActionSecondaryRest = DarkHcColorTokens.colorThemeBg,
bgCanvasDefault = DarkHcColorTokens.colorThemeBg,
bgCanvasDisabled = DarkHcColorTokens.colorGray200,
bgCriticalHovered = DarkHcColorTokens.colorRed1000,
bgCriticalPrimary = DarkHcColorTokens.colorRed900,
bgCriticalSubtle = DarkHcColorTokens.colorRed200,
bgCriticalSubtleHovered = DarkHcColorTokens.colorRed300,
bgDecorative1 = DarkHcColorTokens.colorLime300,
bgDecorative2 = DarkHcColorTokens.colorCyan300,
bgDecorative3 = DarkHcColorTokens.colorFuchsia300,
bgDecorative4 = DarkHcColorTokens.colorPurple300,
bgDecorative5 = DarkHcColorTokens.colorPink300,
bgDecorative6 = DarkHcColorTokens.colorOrange300,
bgInfoSubtle = DarkHcColorTokens.colorBlue200,
bgSubtlePrimary = DarkHcColorTokens.colorGray400,
bgSubtleSecondary = DarkHcColorTokens.colorGray300,
bgSuccessSubtle = DarkHcColorTokens.colorGreen200,
borderCriticalHovered = DarkHcColorTokens.colorRed1000,
borderCriticalPrimary = DarkHcColorTokens.colorRed900,
borderCriticalSubtle = DarkHcColorTokens.colorRed500,
borderDisabled = DarkHcColorTokens.colorGray500,
borderFocused = DarkHcColorTokens.colorBlue900,
borderInfoSubtle = DarkHcColorTokens.colorBlue500,
borderInteractiveHovered = DarkHcColorTokens.colorGray1100,
borderInteractivePrimary = DarkHcColorTokens.colorGray800,
borderInteractiveSecondary = DarkHcColorTokens.colorGray600,
borderSuccessSubtle = DarkHcColorTokens.colorGreen500,
iconAccentPrimary = DarkHcColorTokens.colorGreen900,
iconAccentTertiary = DarkHcColorTokens.colorGreen800,
iconCriticalPrimary = DarkHcColorTokens.colorRed900,
iconDisabled = DarkHcColorTokens.colorGray700,
iconInfoPrimary = DarkHcColorTokens.colorBlue900,
iconOnSolidPrimary = DarkHcColorTokens.colorThemeBg,
iconPrimary = DarkHcColorTokens.colorGray1400,
iconPrimaryAlpha = DarkHcColorTokens.colorAlphaGray1400,
iconQuaternary = DarkHcColorTokens.colorGray700,
iconQuaternaryAlpha = DarkHcColorTokens.colorAlphaGray700,
iconSecondary = DarkHcColorTokens.colorGray900,
iconSecondaryAlpha = DarkHcColorTokens.colorAlphaGray900,
iconSuccessPrimary = DarkHcColorTokens.colorGreen900,
iconTertiary = DarkHcColorTokens.colorGray800,
iconTertiaryAlpha = DarkHcColorTokens.colorAlphaGray800,
textActionAccent = DarkHcColorTokens.colorGreen900,
textActionPrimary = DarkHcColorTokens.colorGray1400,
textCriticalPrimary = DarkHcColorTokens.colorRed900,
textDecorative1 = DarkHcColorTokens.colorLime1100,
textDecorative2 = DarkHcColorTokens.colorCyan1100,
textDecorative3 = DarkHcColorTokens.colorFuchsia1100,
textDecorative4 = DarkHcColorTokens.colorPurple1100,
textDecorative5 = DarkHcColorTokens.colorPink1100,
textDecorative6 = DarkHcColorTokens.colorOrange1100,
textDisabled = DarkHcColorTokens.colorGray800,
textInfoPrimary = DarkHcColorTokens.colorBlue900,
textLinkExternal = DarkHcColorTokens.colorBlue900,
textOnSolidPrimary = DarkHcColorTokens.colorThemeBg,
textPlaceholder = DarkHcColorTokens.colorGray800,
textPrimary = DarkHcColorTokens.colorGray1400,
textSecondary = DarkHcColorTokens.colorGray900,
textSuccessPrimary = DarkHcColorTokens.colorGreen900,
isLight = false,
)
105 changes: 105 additions & 0 deletions assets/android/src/SemanticColorsLight.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
/*
* Copyright (c) 2024 New Vector Ltd
*
* 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
*
* http://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.
*/
/**
* !!! WARNING !!!
*
* THIS IS AN AUTOGENERATED FILE.
* DO NOT EDIT MANUALLY.
*/



@file:Suppress("all")
package io.element.android.compound.tokens.generated

import io.element.android.compound.annotations.CoreColorToken
import io.element.android.compound.tokens.generated.internal.LightColorTokens

/**
* Semantic colors for the light Compound theme.
*/
@OptIn(CoreColorToken::class)
val compoundColorsLight = SemanticColors(
bgAccentHovered = LightColorTokens.colorGreen1000,
bgAccentPressed = LightColorTokens.colorGreen1100,
bgAccentRest = LightColorTokens.colorGreen900,
bgActionPrimaryDisabled = LightColorTokens.colorGray700,
bgActionPrimaryHovered = LightColorTokens.colorGray1200,
bgActionPrimaryPressed = LightColorTokens.colorGray1100,
bgActionPrimaryRest = LightColorTokens.colorGray1400,
bgActionSecondaryHovered = LightColorTokens.colorAlphaGray200,
bgActionSecondaryPressed = LightColorTokens.colorAlphaGray300,
bgActionSecondaryRest = LightColorTokens.colorThemeBg,
bgCanvasDefault = LightColorTokens.colorThemeBg,
bgCanvasDisabled = LightColorTokens.colorGray200,
bgCriticalHovered = LightColorTokens.colorRed1000,
bgCriticalPrimary = LightColorTokens.colorRed900,
bgCriticalSubtle = LightColorTokens.colorRed200,
bgCriticalSubtleHovered = LightColorTokens.colorRed300,
bgDecorative1 = LightColorTokens.colorLime300,
bgDecorative2 = LightColorTokens.colorCyan300,
bgDecorative3 = LightColorTokens.colorFuchsia300,
bgDecorative4 = LightColorTokens.colorPurple300,
bgDecorative5 = LightColorTokens.colorPink300,
bgDecorative6 = LightColorTokens.colorOrange300,
bgInfoSubtle = LightColorTokens.colorBlue200,
bgSubtlePrimary = LightColorTokens.colorGray400,
bgSubtleSecondary = LightColorTokens.colorGray300,
bgSuccessSubtle = LightColorTokens.colorGreen200,
borderCriticalHovered = LightColorTokens.colorRed1000,
borderCriticalPrimary = LightColorTokens.colorRed900,
borderCriticalSubtle = LightColorTokens.colorRed500,
borderDisabled = LightColorTokens.colorGray500,
borderFocused = LightColorTokens.colorBlue900,
borderInfoSubtle = LightColorTokens.colorBlue500,
borderInteractiveHovered = LightColorTokens.colorGray1100,
borderInteractivePrimary = LightColorTokens.colorGray800,
borderInteractiveSecondary = LightColorTokens.colorGray600,
borderSuccessSubtle = LightColorTokens.colorGreen500,
iconAccentPrimary = LightColorTokens.colorGreen900,
iconAccentTertiary = LightColorTokens.colorGreen800,
iconCriticalPrimary = LightColorTokens.colorRed900,
iconDisabled = LightColorTokens.colorGray700,
iconInfoPrimary = LightColorTokens.colorBlue900,
iconOnSolidPrimary = LightColorTokens.colorThemeBg,
iconPrimary = LightColorTokens.colorGray1400,
iconPrimaryAlpha = LightColorTokens.colorAlphaGray1400,
iconQuaternary = LightColorTokens.colorGray700,
iconQuaternaryAlpha = LightColorTokens.colorAlphaGray700,
iconSecondary = LightColorTokens.colorGray900,
iconSecondaryAlpha = LightColorTokens.colorAlphaGray900,
iconSuccessPrimary = LightColorTokens.colorGreen900,
iconTertiary = LightColorTokens.colorGray800,
iconTertiaryAlpha = LightColorTokens.colorAlphaGray800,
textActionAccent = LightColorTokens.colorGreen900,
textActionPrimary = LightColorTokens.colorGray1400,
textCriticalPrimary = LightColorTokens.colorRed900,
textDecorative1 = LightColorTokens.colorLime1100,
textDecorative2 = LightColorTokens.colorCyan1100,
textDecorative3 = LightColorTokens.colorFuchsia1100,
textDecorative4 = LightColorTokens.colorPurple1100,
textDecorative5 = LightColorTokens.colorPink1100,
textDecorative6 = LightColorTokens.colorOrange1100,
textDisabled = LightColorTokens.colorGray800,
textInfoPrimary = LightColorTokens.colorBlue900,
textLinkExternal = LightColorTokens.colorBlue900,
textOnSolidPrimary = LightColorTokens.colorThemeBg,
textPlaceholder = LightColorTokens.colorGray800,
textPrimary = LightColorTokens.colorGray1400,
textSecondary = LightColorTokens.colorGray900,
textSuccessPrimary = LightColorTokens.colorGreen900,
isLight = true,
)
Loading

0 comments on commit df53a1a

Please sign in to comment.