Playing With Colors

rtesluk

Member
Licensed User
Longtime User
June 1 2012
10:45 Hours

I like colors in my apps. So I usually have a 'control' activity to create difference color combinations.

I used these colors for panels, labels and label text.

I find that the color dialog is good most of the time but not for 'fine-tuning' the rgb values.

So, I created this activity for that purpose.

The sample panel and label with text is located at the top.

The toggle view switches between label color and label text color.

The radio buttons select the panel, label or label color.

The check buttons select the red, green and blue values.

The seekbars are for 'gross' selection of the red, green or blue values.

The plus and minus buttons are for 'fine' selection of the red, green or blue values.

You can also tap on the panel, label or text for a 'random' combination to be used.

I have attached a zipped file of the project for your perusal.

I would entertain any suggestions, comments etc.

Regards,

Ray Tesluk :sign0104:
 

Attachments

  • TweetColor20120601.zip
    9.2 KB · Views: 295

rtesluk

Member
Licensed User
Longtime User
Playing With Colors Update

Jun 2 2012
10:00 Hours

I added four new button views

Save - colors as default or system
SaveL - colors to a list for future viewing
< - view SAVED color combinations LEFT
> - view SAVED color combinations RIGHT

Ray Tesluk :sign0104:
 

Attachments

  • TweetColor20120602.zip
    17.1 KB · Views: 277
Upvote 0

rtesluk

Member
Licensed User
Longtime User
Playing With Colors Update #3

Added some gradientdrawable views for fun

Ray Tesluk :sign0104:
 

Attachments

  • TweetColor20120602c.zip
    16.6 KB · Views: 296
  • ColorPatterns.png
    ColorPatterns.png
    25.9 KB · Views: 376
Last edited:
Upvote 0

rtesluk

Member
Licensed User
Longtime User
Another Update

Jun 13 2012
08:45 Hours

I found this code searching for 'gradientdrawable' that reduces the amount of code. It's in the CodeModule Activity.

B4X:
Sub GD(col0 As Int, col1 As Int, Radius As Float, Style As String) As GradientDrawable
   Dim gdw As GradientDrawable
   Dim Cols(2) As Int
   Cols(0) = col0
   Cols(1) = col1
   gdw.Initialize(Style, Cols)
   gdw.CornerRadius = Radius
   Return gdw
End Sub

Ray Tesluk :sign0104::sign0060:
 

Attachments

  • TweetColor20120613.zip
    16.8 KB · Views: 279
Upvote 0
Top