Results 1 to 13 of 13

Thread: see my color dialog

  1. #1

    Thread Starter
    l33t! MrPolite's Avatar
    Join Date
    Sep 2001
    Posts
    4,428

    Talking see my color dialog

    well this is just a screen shot, nothign else

    Right now it only shows system colors and knownColors. I guess I have to somehow make a color list of my own, but I dont know which colors I have to select....
    anyways, tell me if you think I should add something else to it?





    edit: one big question! umm the list that you see is just a series of label controls. The highlighted area is a label, the colors and the text are each separate labels too. Is there any better way to do this, and keep the look like this?
    Attached Images Attached Images  
    rate my posts if they help ya!
    Extract thumbnail without reading the whole image file: (C# - VB)
    Apply texture to bitmaps: (C# - VB)
    Extended console library: (VB)
    Save JPEG with a certain quality (image compression): (C# - VB )
    VB.NET to C# conversion tips!!

  2. #2

    Thread Starter
    l33t! MrPolite's Avatar
    Join Date
    Sep 2001
    Posts
    4,428

    Talking added grayscale colors to it




    ok, what else should I add? give me some ideas plz

    btw can someone tell me how to add the "default" colors? every program has a list of default colors. I'm sure they are not RANDOM colors. This is the list of fireworks "color cubes". I have no idea what pattern they've used to get these. Can someone help me?

    (ahem ahem, yeah I'm using fireworks as an example, everything in my app looks like fireworks )
    Attached Images Attached Images  
    rate my posts if they help ya!
    Extract thumbnail without reading the whole image file: (C# - VB)
    Apply texture to bitmaps: (C# - VB)
    Extended console library: (VB)
    Save JPEG with a certain quality (image compression): (C# - VB )
    VB.NET to C# conversion tips!!

  3. #3

    Thread Starter
    l33t! MrPolite's Avatar
    Join Date
    Sep 2001
    Posts
    4,428
    ignore this
    Attached Images Attached Images  
    rate my posts if they help ya!
    Extract thumbnail without reading the whole image file: (C# - VB)
    Apply texture to bitmaps: (C# - VB)
    Extended console library: (VB)
    Save JPEG with a certain quality (image compression): (C# - VB )
    VB.NET to C# conversion tips!!

  4. #4
    Your Ad Here! Edneeis's Avatar
    Join Date
    Feb 2000
    Location
    Moreno Valley, CA (SoCal)
    Posts
    7,339
    Wow looks great!

  5. #5
    C# Aficionado Lord_Rat's Avatar
    Join Date
    Sep 2001
    Location
    Cave
    Posts
    2,497
    The 'default' colors are the standard 256 color pallete. They are colors 0 to 255.
    Need to re-register ASP.NET?
    C:\WINNT\Microsoft.NET\Framework\v#VERSIONNUMBER#\aspnet_regiis -i

    (Edit #VERSIONNUMBER# as needed - do a DIR if you don't know)

  6. #6

    Thread Starter
    l33t! MrPolite's Avatar
    Join Date
    Sep 2001
    Posts
    4,428
    Wow looks great!
    tnx

    The 'default' colors are the standard 256 color pallete. They are colors 0 to 255.
    umm how can I get those 256 colors though? what's the rgb pattern...?
    the one I showed above from fireworks has only 216. The RGB values are incremented by 51. That's how they get their 216 colors.
    but how do I get the 256 colors? should be simple, I think I'm turning dumb
    Last edited by MrPolite; Feb 3rd, 2003 at 08:33 PM.
    rate my posts if they help ya!
    Extract thumbnail without reading the whole image file: (C# - VB)
    Apply texture to bitmaps: (C# - VB)
    Extended console library: (VB)
    Save JPEG with a certain quality (image compression): (C# - VB )
    VB.NET to C# conversion tips!!

  7. #7

    Thread Starter
    l33t! MrPolite's Avatar
    Join Date
    Sep 2001
    Posts
    4,428
    umm bump, how do I get the 256 color pallet?
    rate my posts if they help ya!
    Extract thumbnail without reading the whole image file: (C# - VB)
    Apply texture to bitmaps: (C# - VB)
    Extended console library: (VB)
    Save JPEG with a certain quality (image compression): (C# - VB )
    VB.NET to C# conversion tips!!

  8. #8

    Thread Starter
    l33t! MrPolite's Avatar
    Join Date
    Sep 2001
    Posts
    4,428
    I feel stupid for bumping this, because this should be easy... but anyways, I'm still looking for an answer. Anyone knows what I should do to get the default 256 colors?
    rate my posts if they help ya!
    Extract thumbnail without reading the whole image file: (C# - VB)
    Apply texture to bitmaps: (C# - VB)
    Extended console library: (VB)
    Save JPEG with a certain quality (image compression): (C# - VB )
    VB.NET to C# conversion tips!!

  9. #9
    Fanatic Member Geespot's Avatar
    Join Date
    Oct 2001
    Location
    Birmingham, UK
    Posts
    577
    Originally posted by MrPolite
    This is the list of fireworks "color cubes". I have no idea what pattern they've used to get these. Can someone help me?
    I just worked it out
    Add a PictureBox to your form called PictureBox1, and add this code

    VB Code:
    1. Private Sub PictureBox1_Paint(ByVal sender As Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles PictureBox1.Paint
    2.         Dim overallX As Integer
    3.         Dim overallY As Integer
    4.         Dim Increments() = {0, 42, 91, 144, 198, 255}
    5.         Dim Ix As Integer
    6.         Dim Iy As Integer
    7.         Dim Width As Integer = 10
    8.         Dim Red As Integer
    9.  
    10.  
    11.         For Red = 0 To UBound(Increments)
    12.             For Ix = 0 To UBound(Increments)
    13.                 For Iy = 0 To UBound(Increments)
    14.                     Dim R As Rectangle = New Rectangle((Ix * Width) + overallX, (Iy * Width) + overallY, Ix + Width, Iy + Width)
    15.                     Dim Brush As System.Drawing.SolidBrush
    16.                     Brush = New System.Drawing.SolidBrush(Color.FromArgb(Increments(Red), Increments(Ix), Increments(Iy)))
    17.                     e.Graphics.FillRectangle(Brush, R)
    18.                 Next
    19.             Next
    20.  
    21.             overallX += Width * (UBound(Increments) + 1)
    22.             If overallX Mod (3 * (UBound(Increments) + 1)) = 0 Then
    23.                 overallX = 0
    24.                 overallY += Width * (UBound(Increments) + 1)
    25.             End If
    26.  
    27.         Next
    28.  
    29.  
    30.  
    31.     End Sub

  10. #10
    Fanatic Member Geespot's Avatar
    Join Date
    Oct 2001
    Location
    Birmingham, UK
    Posts
    577
    although

    VB Code:
    1. overallX += Width * (UBound(Increments) + 1)
    2.             If overallX Mod (3 * (UBound(Increments) + 1)) = 0 Then
    3.                 overallX = 0
    4.                 overallY += Width * (UBound(Increments) + 1)
    5.             End If

    is bugged like hell

    It was spose to draw 3 blocks of colours, then move down to draw the other 3 block of colours, but changing the Width variable breaks it

  11. #11

    Thread Starter
    l33t! MrPolite's Avatar
    Join Date
    Sep 2001
    Posts
    4,428
    hmm looks cool anyways the fireworks one and also yours makes 216 colors, hmmmmm!! So I guess it wouldnt be the default 256 colors
    anyways I'll try it soon. Thanks
    rate my posts if they help ya!
    Extract thumbnail without reading the whole image file: (C# - VB)
    Apply texture to bitmaps: (C# - VB)
    Extended console library: (VB)
    Save JPEG with a certain quality (image compression): (C# - VB )
    VB.NET to C# conversion tips!!

  12. #12
    Fanatic Member Geespot's Avatar
    Join Date
    Oct 2001
    Location
    Birmingham, UK
    Posts
    577
    If you interested this is how i worked it out


    I took a screenshot of the fireworks picture you added, then using a paint program i checked what each of the top left across colour values were

    I noticed it was all green 0, 42, 91, 144, 198, 255
    Then i check the top left down colour values and notice it was all just blue 0, 42, 91, 144, 198, 255

    Then i noticed the rest of the colour in the top left colours block were just inbetween values of the above values.

    Then I went on to the next colour block and notice the red had increased by the above values

    and just write that small routine to show me the results

  13. #13

    Thread Starter
    l33t! MrPolite's Avatar
    Join Date
    Sep 2001
    Posts
    4,428
    ok thanks to everyone... here's the working version of it. I made the grayscale ones a little smaller, but they dont fit quite right in the control, I guess it's ok though

    Attached Images Attached Images  
    rate my posts if they help ya!
    Extract thumbnail without reading the whole image file: (C# - VB)
    Apply texture to bitmaps: (C# - VB)
    Extended console library: (VB)
    Save JPEG with a certain quality (image compression): (C# - VB )
    VB.NET to C# conversion tips!!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width