Some of my apps are multiplatform, my Sudoku, for example works on Android, Windows, iOS, OSX and HTML. For some of them, as Weight, I had to follow the various platform guidelines (as Material Design), but at the same time give it a uniform look and feel across the platforms. I wrote this post ()with an embedded script) to simplify the colors selection and coding in such cases.

In other words, when developing a multiplatform app, the color language should identify the app, but also match the platform guidelines. Because each platform uses a different preferred implementation language, this post proposes a small script to generate the code for a specific color in few of them:

  • Objective-C and Swift for iOS and OSX apps;
  • Java for Android apps;
  • C# for Windows apps.



  

LanguageOSCode
Objective CiOS, OSX
UIColor
SwiftiOS, OSX
UIColor
JavaAndroid
android.graphics.Color
C#Windows 10
Windows.UI.Color
CSSHTML pages

  


Android Material Colors

Android Material Design suggests a specific color palette, few of its colors are:
Red: #f44336 Pink: #e91e63 Deep Purple: #9c27b0 Indigo: #673ab7 Blue: #2196f3
Light Blue: #03a9f4 Cyan: #00bcd4 Teal: #009688 Green: #4caf50 Light Green: #8bc34a
Lime: #cddc39 Yellow: #ffeb3b Amber: #ffc107 Orange: #ff9800 Deep Orange: #ff5722
Brown: #795548 Grey: #9e9e9e Blue Grey: #607d8b

iOS Guidelines: Colors

Colors
#54C7FC #FFCD00 #FF9600 #FF2851
#0076FF #44DB5E #FF3824 #8E8E93