]> Pileus Git - ~andy/spades/blobdiff - src/org/pileus/spades/Os.java
Display IRC colors in text view
[~andy/spades] / src / org / pileus / spades / Os.java
index 4f9e0fb4ce0d62d70d2adefd9231f643d5ffcf65..39cbcb62bdf80197cfabe978da48a03730661b7a 100644 (file)
@@ -2,6 +2,7 @@ package org.pileus.spades;
 
 import android.util.Log;
 import android.util.Base64;
+import android.graphics.Color;
 
 public class Os
 {
@@ -20,4 +21,9 @@ public class Os
        {
                return Base64.encodeToString(txt.getBytes(), 0);
        }
+
+       public static int getColor(String hex)
+       {
+               return Color.parseColor("#"+hex);
+       }
 }