Skip to content

Commit

Permalink
Correct tables in make_schemes.md
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 584883837
  • Loading branch information
Material Eng authored and copybara-github committed Nov 23, 2023
1 parent 6018b17 commit f16ff28
Showing 1 changed file with 24 additions and 48 deletions.
72 changes: 24 additions & 48 deletions make_schemes.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,78 +45,54 @@ contrast levels. The functionality of `Scheme` is fully replicated by

<section>



###### Dart

| Instead of … | Use … |
| ---------------------------- | ----------------------------------- |
| `Scheme.light(color)` | `SchemeTonalSpot(sourceColorHct: |
: : Hct.fromInt(color), isDark\: false, :
: : contrastLevel\: 0.0)` :
| `Scheme.dark(color)` | `SchemeTonalSpot(sourceColorHct: |
: : Hct.fromInt(color), isDark\: true, :
: : contrastLevel\: 0.0)` :
| `Scheme.lightContent(color)` | `SchemeContent(sourceColorHct: |
: : Hct.fromInt(color), isDark\: false, :
: : contrastLevel\: 0.0)` :
| `Scheme.darkContent(color)` | `SchemeContent(sourceColorHct: |
: : Hct.fromInt(color), isDark\: true, :
: : contrastLevel\: 0.0)` :
| `Scheme.light(color)` | `SchemeTonalSpot(sourceColorHct: Hct.fromInt(color), isDark: false, contrastLevel: 0.0)` |
| `Scheme.dark(color)` | `SchemeTonalSpot(sourceColorHct: Hct.fromInt(color), isDark: true, contrastLevel: 0.0)` |
| `Scheme.lightContent(color)` | `SchemeContent(sourceColorHct: Hct.fromInt(color), isDark: false, contrastLevel: 0.0)` |
| `Scheme.darkContent(color)` | `SchemeContent(sourceColorHct: Hct.fromInt(color), isDark: true, contrastLevel: 0.0)` |

###### Java

| Instead of … | Use … |
| ---------------------------- | --------------------------------------------- |
| `Scheme.light(color)` | `new SchemeTonalSpot(Hct.fromInt(color), |
: : false, 0.0)` :
| `Scheme.dark(color)` | `new SchemeTonalSpot(Hct.fromInt(color), |
: : true, 0.0)` :
| `Scheme.lightContent(color)` | `new SchemeContent(Hct.fromInt(color), false, |
: : 0.0)` :
| `Scheme.darkContent(color)` | `new SchemeContent(Hct.fromInt(color), true, |
: : 0.0)` :
| `Scheme.light(color)` | `new SchemeTonalSpot(Hct.fromInt(color), false, 0.0)` |
| `Scheme.dark(color)` | `new SchemeTonalSpot(Hct.fromInt(color), true, 0.0)` |
| `Scheme.lightContent(color)` | `new SchemeContent(Hct.fromInt(color), false, 0.0)` |
| `Scheme.darkContent(color)` | `new SchemeContent(Hct.fromInt(color), true, 0.0)` |

###### TypeScript

| Instead of … | Use … |
| ---------------------------- | --------------------------------------------- |
| `Scheme.light(color)` | `new SchemeTonalSpot(Hct.fromInt(color), |
: : false, 0.0)` :
| `Scheme.dark(color)` | `new SchemeTonalSpot(Hct.fromInt(color), |
: : true, 0.0)` :
| `Scheme.lightContent(color)` | `new SchemeContent(Hct.fromInt(color), false, |
: : 0.0)` :
| `Scheme.darkContent(color)` | `new SchemeContent(Hct.fromInt(color), true, |
: : 0.0)` :
| `Scheme.light(color)` | `new SchemeTonalSpot(Hct.fromInt(color), false, 0.0)` |
| `Scheme.dark(color)` | `new SchemeTonalSpot(Hct.fromInt(color), true, 0.0)` |
| `Scheme.lightContent(color)` | `new SchemeContent(Hct.fromInt(color), false, 0.0)` |
| `Scheme.darkContent(color)` | `new SchemeContent(Hct.fromInt(color), true, 0.0)` |

###### C++

| Instead of … | Use … |
| ---------------------------------------- | --------------------------------- |
| `MaterialLightColorScheme(color)` | `SchemeTonalSpot(Hct(color), |
: : false, 0.0)` :
| `MaterialDarkColorScheme(color)` | `SchemeTonalSpot(Hct(color), |
: : true, 0.0)` :
| `MaterialLightContentColorScheme(color)` | `SchemeContent(Hct(color), false, |
: : 0.0)` :
| `MaterialDarkContentColorScheme(color)` | `SchemeContent(Hct(color), true, |
: : 0.0)` :
| `MaterialLightColorScheme(color)` | `SchemeTonalSpot(Hct(color), false, 0.0)` |
| `MaterialDarkColorScheme(color)` | `SchemeTonalSpot(Hct(color), true, 0.0)` |
| `MaterialLightContentColorScheme(color)` | `SchemeContent(Hct(color), false, 0.0)` |
| `MaterialDarkContentColorScheme(color)` | `SchemeContent(Hct(color), true, 0.0)` |

###### Swift

| Instead of … | Use … |
| ---------------------------- | ----------------------------------- |
| `Scheme.light(color)` | `SchemeTonalSpot(sourceColorHct: |
: : Hct.fromInt(color), isDark\: false, :
: : contrastLevel\: 0.0)` :
| `Scheme.dark(color)` | `SchemeTonalSpot(sourceColorHct: |
: : Hct.fromInt(color), isDark\: true, :
: : contrastLevel\: 0.0)` :
| `Scheme.lightContent(color)` | `SchemeContent(sourceColorHct: |
: : Hct.fromInt(color), isDark\: false, :
: : contrastLevel\: 0.0)` :
| `Scheme.darkContent(color)` | `SchemeContent(sourceColorHct: |
: : Hct.fromInt(color), isDark\: true, :
: : contrastLevel\: 0.0)` :
| `Scheme.light(color)` | `SchemeTonalSpot(sourceColorHct: Hct.fromInt(color), isDark: false, contrastLevel: 0.0)` |
| `Scheme.dark(color)` | `SchemeTonalSpot(sourceColorHct: Hct.fromInt(color), isDark: true, contrastLevel: 0.0)` |
| `Scheme.lightContent(color)` | `SchemeContent(sourceColorHct: Hct.fromInt(color), isDark: false, contrastLevel: 0.0)` |
| `Scheme.darkContent(color)` | `SchemeContent(sourceColorHct: Hct.fromInt(color), isDark: true, contrastLevel: 0.0)` |



</section>

Expand Down

0 comments on commit f16ff28

Please sign in to comment.