Skip to content

Instantly share code, notes, and snippets.

@matthewmorrone
Created September 26, 2020 13:28
Show Gist options
  • Select an option

  • Save matthewmorrone/445cef4548df999bae535aef80733582 to your computer and use it in GitHub Desktop.

Select an option

Save matthewmorrone/445cef4548df999bae535aef80733582 to your computer and use it in GitHub Desktop.
I don't actually know how these matrices work
String bg = sharedPreferences.getString("bg", "#FF000000");
int[] bgc = Util.fromColor(bg);
float[] sCustomColorArray = {
1.0f, 0, 0, 0, bgc[1], // red
0, 1.0f, 0, 0, bgc[2], // green
0, 0, 1.0f, 0, bgc[3], // blue
0, 0, 0, 1.0f, bgc[0] // alpha
};
mDefaultFilter = sCustomColorArray;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment