Arraying a series of colors

hi all, i'm facing a problem working on a matching game and wonder if anybody could point me in the right direction.
see, i have a 9x10 gridboard with 90 pieces to match, and there're 45 pairs of pieces of the same Oval look, except with different colors. i am implementing 9 different colors, so that each piece will have 5 pairs to match up when the player plays the game, meaning a total of 10 pieces for each different color. the thing is, i'm not sure if there is any way to array my colors (the basic ones, like white, red, magenta, cyan etc.) so that I can run a loop to allow the computer to place each piece behind a grid on the board.
so far, my coding looks like:
final int SETS = 10;
final int COLORS = 9;
for(int draw = 0; draw < SETS; draw++)
     for(int max = 0; max < COLORS; max++)
          int x = (int) (java.lang.Math.random()*GRIDCOLS);
          int y = (int) (java.lang.Math.random()*GRIDROWS);
          if(position[x][y] == EMPTY)
               g.setColor(Color.white);
               shape(x,y); //calls the shape to be drawn
               position[x][y] = FILLED;
          else if(position[x][y] != EMPTY)
               max--;
the part in question lies in that bolded sentence. i do not know how to change colors for that part so that the loop creates one piece of each different color, before looping that 10 times.
can anybody help me a little?

There is a Color c'tor, which uses a single int value. If you write the colors as hex its similar to the way you specify colors in html or drawing applications.
The format is 0xRRGGBB (red, green, blue).
Eg 0xFF0000 = red, 0xCCCCCC=some light gray etc.
You can easily put those numbers into one array and use those numbers for constructing the color object.
int []col={0xFF0000,0x00FF00,0x0000FF};
g.setColor(new Color(col[x]));Easy, ne? :)

Similar Messages

  • Can I access Flex's default Chart colors? Or can I access a Series' current color?

    I've created a popup to dynamically add/remove Series from a LineChart and/or AreaChart.  Problem is, I want to keep the Series' line color consistent, and Flex wants to re-assign them from it's default list, which is confusing.
    I don't want to just set the Series.visible to false for two reasons:
    1. I also want the LegendItem to disappear from the Legend
    2. Stacked AreaCharts (type == 'stacked') get messed up when you set one of its Series.visible = false
    So to avoid color reassignment, I want to explicitly set the lineStroke for my Series.  But if I'm using Flex's default colors, I need to either:
    a. Have access to the static default color array - does anyone know where this is???  or
    b. After the Series are drawn (updateComplete?), I need to query each for its lineStroke color and then explicitly set it to that same color.  How do I do this???  getStyle('lineStroke') returns null, and I can't see a way to get at the renderer.
    I'm essentially re-posting the following unanswered posts, which I promise to link back to this if someone can please help:
    Binding to Rendered Chart Data [http://forums.adobe.com/message/186840#186840]
    Getting the default pie chart colors [http://forums.adobe.com/message/36410#36410]
    Please help!

    Matt, thanks for your reply, but unfortunately, for LineCharts, LineSeries.getStyle('fill') always returns 0xffffff (white).
    I finally found that after my LineChart is completely rendered, (sometime after LineSeries' updateComplete), LineSeries.getStyle('lineStroke') and getStyle('stroke') both return the correct Stroke.color values ("lineStroke" refers to the line segment and "stroke" to the data point).
    Rather than fooling around with collecting the actual values dynamically, I just generated some trace() output from a  LineChart with a bunch of Series to create my own static Array from which I can initialize my Series.setStyle(color) as I dynamically add them to my LineChart:
            public static const DEFAULT_FLEX_SERIES_COLORS:Array = [
                0xe48701, 0xa5bc4e, 0x1b95d9, 0xcaca9e,
                0x6693b0, 0xf05e27, 0x86d1e4, 0xe4f9a0,
                0xffd512, 0x75b000, 0x0662b0, 0xede8c6,
                0xcc3300, 0xd1dfe7, 0x52d4ca, 0xc5e05d,
                0xe7c174, 0xfff797, 0xc5f68f, 0xbdf1e6,
                0x9e987d, 0xeb988d, 0x91c9e5, 0x93dc4a,
                0xffb900, 0x9ebbcd, 0x009797, 0x0db2c2
    It turns out there's only 28 unique color values before the color pattern repeats.  I don't see a numerical pattern; perhaps someone with more time on their hands can figure out if there's a function behind this series of values (printed here in binary, decimal, and hex):
            111001001000011100000001  14976769  0xe48701
            101001011011110001001110  10861646  0xa5bc4e
            000110111001010111011001  01807833  0x1b95d9
            110010101100101010011110  13290142  0xcaca9e
            011001101001001110110000  06722480  0x6693b0
            111100000101111000100111  15752743  0xf05e27
            100001101101000111100100  08835556  0x86d1e4
            111001001111100110100000  15006112  0xe4f9a0
            111111111101010100010010  16766226  0xffd512
            011101011011000000000000  07712768  0x75b000
            000001100110001010110000  00418480  0x0662b0
            111011011110100011000110  15591622  0xede8c6
            110011000011001100000000  13382400  0xcc3300
            110100011101111111100111  13754343  0xd1dfe7
            010100101101010011001010  05428426  0x52d4ca
            110001011110000001011101  12968029  0xc5e05d
            111001111100000101110100  15188340  0xe7c174
            111111111111011110010111  16775063  0xfff797
            110001011111011010001111  12973711  0xc5f68f
            101111011111000111100110  12448230  0xbdf1e6
            100111101001100001111101  10393725  0x9e987d
            111010111001100010001101  15440013  0xeb988d
            100100011100100111100101  09554405  0x91c9e5
            100100111101110001001010  09690186  0x93dc4a
            111111111011100100000000  16759040  0xffb900
            100111101011101111001101  10402765  0x9ebbcd
            000000001001011110010111  00038807  0x009797
            000011011011001011000010  00897730  0x0db2c2
    Anyway, it sure would have been nice to have access to this in the API - hopefully I've saved someone else the time I've wasted...

  • Using array to generate fill colors

    I'm building a series of swatch books from an Excel file that lists the RGB values for each color (2,000+). I'm brand new to extendscript and would appreciate some help dynamically filling all those rectangles with the proper color. A model script fragment showing how to fill shapes would be great. I think I have a handle on creating and positioning the objects. Thanks!
    Oh, I'm using javascript.

    search the forum, you'll find a couple of scripts already made.
    here's one
    Colour Swatch Book Generator

  • Sony Vaio F Series Screen Colors Brushed Out

    Hi, Im running Windows 7 Home Premium on my Vaio VPCF235FG, I did windows recovery but the colors seem brushed out. I did update my Nvedia Driver but still same issue. I did some researches on google and I found out it has to do with Monitor LED not getting enough power to give full color depth something like that, but I dont know which driver or software patch I have to download to fix this issue. Please help

    Hi Hu22aM,
    Welcome To Sony Community!
    We're sorry to hear this. I have few questions for you to help me understand what's really going on.
    When did it star to happen?
    May I know why you needed to do windows recovery? Is this when the computer went back to factory setting?
    If so how did you do it, was it using a recovery disc or through the partition ? 
    Let's try to isolate the issue
    Turn of the laptop
    Go to BIOS by repeatedly hitting F2 right after you turn it on (was the color brushed out)
    If the screen color is the same then it means that it's a hardware issue (repair is needed
    If screen if normal, then go to the Sony website and update the drivers and software.
    Unfortunately, we are unable to assist customers outside of the US. We kindly recommend visiting our Sony Global Web site for information on contacting the Sony Support Center in your region at http://www.sony.net/SonyInfo/Support/.
    Regards,
    Jen
    If my post answers your question, please mark it as "Accept as Solution"

  • Array of clusters and in the cluster is a bar meter, how can I change the color individually?

    Array of clusters and in the cluster is a bar meter, how can I change the color of the bar meter individually for each element of the array?  I have just figured out that you can't change properties of one element of the array without all elements changing.  For the scaling I had to make numeric indicators for each tick of the scale so that each bar meter in the clustered array would have individual scales.  I also had to do some math to scale each barmeter to display correct proportions from 0 to 100%.  Now I'm stumped on the color of the bar meter.  Basically, if the value goes over a setpoint, the bar meter needs to turn red.  It has to be in an array to be infinitely scalable.
    Thanks
    Matt
    Solved!
    Go to Solution.

    You can't do that-
    without a little trick.
    You could consider laying a custom color box over the bar graph in the cluster you can set the color based on the value of the bar graph or even make a "Pseudo"- bar graph using a series of color boxes stacked to look lie a bar and changing values of the Color boxs from empty to full to red.
    Here is an example to demonstrate
    Jeff
    Attachments:
    Pseudo bar.vi ‏12 KB

  • Change color in chart series (Chart Controls)?

    Does anyone know if it's possible to change the color within a series in Microsoft Chart Controls?  My data is X = test time and Y = response time using a column graph.  Currently when the test to collect response time fails it does not
    record a numerical value and when graphed it appears as though the response time was minimal.  I want to make it stand out when a failure occurs, for example to draw a large column and change the color to red (other values are in blue).
    I don't have much experience using Chart Controls yet.  I know you can use an alternate color with a different series of data but it doesn't appear you can change it from within. 
    This is my chart series (when a test fails, the response matches "" and not $NULL):
    [void]$chart1.Series.Add("ResponseTime")
    $chart1.Series["ResponseTime"].ChartType = "Line"
    $chart1.Series["ResponseTime"].BorderWidth  = 1
    $chart1.Series["ResponseTime"].IsVisibleInLegend = $true
    $chart1.Series["ResponseTime"].chartarea = "ChartArea1"
    $chart1.Series["ResponseTime"].color = "#0404B4"
    $DATA | ForEach-Object {
    If ($_.RESPONSE_MS -eq "") {
    $chart1.Series["ResponseTime"].Points.addxy("FAIL",9999)
    Else {
    $chart1.Series["ResponseTime"].Points.addxy( $_.TIME.Remove(5) , ($_.RESPONSE_MS)) }
    I tried changing the color within the if/else but the first .color value it picks up will be used throughout. 

    Hi Tickermcse76,
    To create a new line chart, please refer to this script:
    function New-Chart
    param ([int]$width,[int]$height,[int]$left,[int]$top,$chartTitle)
    # create chart object
    $global:Chart = New-object System.Windows.Forms.DataVisualization.Charting.Chart
    $global:Chart.Width = $width
    $global:Chart.Height = $height
    $global:Chart.Left = $left
    $global:Chart.Top = $top
    # create a chartarea to draw on and add to chart
    $chartArea = New-Object System.Windows.Forms.DataVisualization.Charting.ChartArea
    $global:chart.ChartAreas.Add($chartArea)
    [void]$global:Chart.Titles.Add($chartTitle)
    # change chart area colour
    $global:Chart.BackColor = [System.Drawing.Color]::Transparent
    } #New-Chart
    New-Chart -width $width -height $height -left $left -top $top -chartTile $chartTitle
    [void]$global:Chart.Series.Add("Data")
    # $global:Chart.Series["Data"].Points.AddXY($(get-date), $($ht.Values))
    $global:Chart.Series["Data"].Points.DataBindXY($ht.Keys,$ht.Values)
    #$global:Chart.Series["Data"].XValueType = [System.Windows.Forms.DataVisualization.Charting.ChartValueType]::Time
    #$global:Chart.chartAreas[0].AxisX.LabelStyle.Format = "hh:mm:ss"
    #$global:Chart.chartAreas[0].AxisX.LabelStyle.Interval = 1
    #$global:Chart.chartAreas[0].AxisX.LabelStyle.IntervalType = [System.Windows.Forms.DataVisualization.Charting.DateTimeIntervalType]::Seconds
    $global:Chart.Series["Data"].ChartType = [System.Windows.Forms.DataVisualization.Charting.SeriesChartType]::Line
    #$global:chart.Series["Data"].IsValueShownAsLabel = $false
    Reference from:
    http://poshcode.org/1205
    To change the chart color, please refer to this script:
    Charting with PowerShell
    I hope this helps.

  • Importing Pantone + series libraries from Pantone Color Manager

    Greetings,
    I'm exporting Pantone + series libraries from Pantonce Color Manager to Illustrator. Specifically Solid Coated & Uncoated. When I open the libraries on Illustrator the values don't match my color guides. That problem doesn't happen when I export them to Photoshop or InDesign. To make things more interesting doesn't happen either when I export + Series Bridge Color Libraries, only on solid colors ?!?!?. I'm using Illustrator CS5.5, any suggestions would be valuable, thanks!
    Aldo

    Someone can correct me if I am wrong, but you are only licensed to use the version of the software supplied by Lenovo, and any updates that Lenovo has licensed through Pantone. Unlike say video drivers, the commercial Pantone software is pay-for-use, and not tied to Lenovo licensing.

  • Color Problem when Aadding/Removing series from Chart

    Is it possible to define the color of the series to add in a Chart?
    Actually, the color seems to be defined in a precise order by the chart itself when adding the series. I think there's a list of predefined colors and for each series added to the chart, it take the next color of the list. Then, when we remove a series, the pointer in that list of colors is decremented.
    That behavior does not suit me. If i remove a series and add it again there are cases where two series can have the same color...
    Example:
    add series 1 - color blue
    add series 2 - color red
    add series 3 - color cyan
    remove series 2
    add series 2 - color cyan
    series 2 and 3 have the same color
    (you can test this behavior)
    So is there a mean to avoid this problem and set the color of series ourself?
    Thanks

    If you search the http://javafx-jira.kenai.com you will come across quite a few open bugs to do with dynamically modifying charts by adding and removing series and data - so I guess, if you are currently using this feature, then proceed with caution (and don't use the chart animation feature) until they are fixed (and log new issues if yours is not already captured).

  • How to change series or line color in excel 2007 using ActiveX

    I am trying to change series color using Excel 2007 with ActiveX as below. It seems the color cannot be controlled correctly. For example, if I chosse red color, my curve will be changed to blue. Any ideas?
    Also, I googled and found a guy ran into similiar problem using VBA for Excel 2007. See the link below:
    http://help.wugnet.com/office/change-series-line-color-excel-2007-vba-ftopict1062646.html
    Set ch = Worksheets("Chart").ChartObjects(1)
    Set objSeries = ch.Chart.SeriesCollection(1)
    objSeries.Format.Line.ForeColor.RGB = RGB(255, 127, 0)
    According to the post, it need to be done as follows
    objSeries.Border.Color = RGB(255, 127, 0) . But I cannot find the border property/method in ActiveX.
    The color seems to be abitrary. and I found the 

    Xubuli,
    I looked into your question and confirmed that Border.Color is not located under the Excel.Series library. Instead, you must locate it under _Worksheet.UsedRange as seen below in the figure. I am attaching the VI file where I located the the Border.Color property node, and I am also including a SubVI on the block diagram that goes into explicitly set the cell color and border. This SubVI can be found under Programming>>Report Generation>>Excel Specific>>Excel Format>>Excel Set Cell Color and Border.vi, if you have the Report Generation Toolkit installed. I hope this helps.
    Larry H
    Applications Engineer
    National Instruments
    Attachments:
    CellBorder.vi ‏8 KB

  • Boolean button changes color briefly when pressed

    Hi, I am using Boolean button as a toggle, so I only want text changes when it is pressed with no changes to button appearance.
    I am able to change the color for On in properties to match the Off color (I am using the Silver palette so normally On is yellow), however when the boolean button is changes to On, there's a brief changes of color still. Is there any way I can get rid of it? 
    In fact some of my buttons blink black while others blink yellow. I have no idea where that is set.
    Thak you very much.
    Solved!
    Go to Solution.

    There are 4 colors for booleans ON and OFF plus going from ON to OFF and going from OFF to ON
    You only see the transition color when you have the Mech latching set to "latch when released"
    Set it to "Latch when pressed" and you will not see the transition colors
    You can set all 4 colors by using the Colors [4] Property
    Colors [4] Property
    Short Name: Colors[4]
    Requires: Base Development System
    Class: Boolean Properties
    To Use: Create a property.
    Array of up to 4 (Foreground Color, Background Color) pairs, where Foreground Color is the foreground color of the Boolean control and Background Color is the background color of the Boolean control. Color pairs include False, True, True to False, and False to True.
    You can set the color of the front panel object by wiring a hexadecimal number with the form RRGGBB or by wiring the color box constant to the property.
    This property is similar to the Colors option on the Appearance page of the Boolean Properties dialog box.
    If the Boolean control has four (Foreground Color, Background Color) pairs for the four states, this property always returns an array of four (Foreground Color, Background Color) pairs when reading. When writing, you can pass in an array of length 1, 2 or 4. If you pass in only one element, this property uses that element value for all four states. If you pass in two elements, this property uses the first element value for the False and True to False states. Similarly, this property uses the second element for the True and False to True states.
    If the Boolean control has only one (Foreground Color, Background Color) pair for all four states, this property returns an array of one (Foreground Color, Background Color) pair when reading, and uses the first array element when writing. You cannot change a Boolean control with one (Foreground Color, Background Color) pair to a Boolean control with multiple (Foreground Color, Background Color) pairs.
    This property only uses the True to False and False to True states when you set the Boolean control to latch or switch when released. You can get and set these (Foreground Color, Background Color) pairs even if you do not have the control set to latch or switch when released; they just are not used.
    Because this property does not change the data of the Boolean control, you can set it at any time.
    You can use the this property for Boolean controls on the Classic, Express, Modern, and Silver palettes. You cannot use this property for Boolean controls on the System palette.
    Omar

  • Importing text file into 2D char array

    Hey folks. I've aged a few years trying to figure this project out. Im trying to make a crossword puzzle and am having problems importing the answer letters into a 2D array of 15*15. The text file would look something like this:
    LAPSE TAP RAH
    AVAIL OLE ODE
    BARGE PARADOX
    etc
    I have JTextFields that the user will answer and a button the user can press to see if the answers are right by comparing the 2D array answer with what the user inputted.-the user input would be scanned and put into a 2D array also.
    How should i go about inserting each letter into an array? The spaces i would later need to make code to grey out the text field. This is what i have so far. Forgive me if its sloppy.
         class gridPanel extends JPanel
              //----Setting Grid variables
              private static final int ROWS = 15;
              private static final int COLS = 15;
              String[] letters = { "A", "B", "C", "D", "E" };// To test entering strings into array
               gridPanel()
                 this.setBackground(Color.BLUE);
                 //.......Making my JTextField grid for user input
                 JTextField[][] grid = new JTextField[ROWS][COLS];
                 for(int ROWS = 0; ROWS<grid.length; ROWS++)
                     for(int COLS = 0; COLS<grid.length; COLS++)
                         grid[ROWS][COLS] = new JTextField(1);
                         add(grid[ROWS][COLS]);
                     //grid[ROWS][COLS].setText("" + letters[0]);
                 String an = null;
                 StringTokenizer tokenizer = null;
                 Character[][] answer = new Character[ROWS][COLS];
              try{
                 BufferedReader bufAns = new BufferedReader( new FileReader("C:\\xwordanswers.txt"));
                 for (int rowCurrent = 0; rowCurrent < ROWS; rowCurrent++)
              an = bufAns.readLine();
              tokenizer = new StringTokenizer(an);
              for (int colCurrent = 0; colCurrent < COLS; colCurrent++) {
              char currentValue = tokenizer.nextToken().charAt(0);//Needs to be changed to reflect each letter
                        answer[rowCurrent][colCurrent] = currentValue;
                    System.out.println(currentValue);
              }catch (IOException ioex)           
                        System.err.println(ioex);
                        System.exit(1);
            }//xword graphics end
          This obviously prints the first char of each word, it also gives me an "Exception in thread "main" java.util.NoSuchElementException" error for some reason.
    Any help is greatly appreciated.
    John

    If the file format is stored as follows:
    APPLE
    L A
    PARSE
    N E
    PEAR then we can parse this into a 2D char array:
    char[][] readMap(String fileName) {
        char[][] ret = new char[ROWS][COLS];
        FileInputStream FIS = new FIleInputStream(fileName);
        int i, j;
        for(i = 0; i < ROWS; i++)
            for(j = 0; j < COLS; j++)
                ret[i][j] = FIS.read();
        FIS.close();
        return ret;
    }Then you can use the resulting 2D char array in your answer checking mechanism.
    Hope this helps~
    Alex Lam S.L.

  • How do I Print Accurate Color from Lightroom?

    I just got my Epson 3880 2 weeks ago.  The problem I am having is getting accurate color when printing from Lightroom.  I am running a p.c. with Windows 8.1.  To eliminate my monitor as the problem, I created a series of color patches in Photoshop, printed them and read them in using the X-Rite Color Munki Photo.  Here is a list of thing I have done:
    1) I chose Lightroom manages color, chose the appropriate icc profile in Lightroom, chose the appropriate paper in the printer dialogue box, and choose no color management in the printer dialogue box.  The results are as follows:
    Blue (0,0,255) prints like Black
    Photoshop RGB
    Color Munki Reading RGB
    1
    (198,198,198)
    (192,197,197)
    2
    (255,128,255)
    (214,130,207)
    3
    (128,255,255)
    (0,196,185)
    4
    (128,128,128)
    (132,132,132)
    5
    (0,0,0)
    (17,16,14)
    6
    (0,255,255)
    (0,186,177)
    7
    (255,0,255)
    (183,78,183)
    8
    (255,255,198)
    (239,229,186)
    9
    (255,255,255)
    (236,241,241)
    10
    (255,0,0)
    (205,0,64)
    11
    (0,255,0)
    (42,179,64)
    12
    (0,0,255)
    (0,31,71)
    13
    (128,128,255)
    (89,146,218)
    14
    (128,255,128)
    (73,191,121)
    15
    (255,128,128)
    (230,102,128)
    16
    (255,255,0)
    (248,210,0)
    Printing from Lightroom – Lightroom Manages Color
    2) I chose Printer manages color, chose the appropriate paper in the printer dialogue box, and choose Epson - srgb in the printer dialogue box.  The results are as follows:
    Grays (198,198,198) and(128,128,128) prints too dark (1 - 2 stops?)
    Photoshop RGB
    Color Munki Reading RGB
    1
    (198,198,198)
    (141,147,148)
    2
    (255,128,255)
    (228,104,194)
    3
    (128,255,255)
    (0,195,186)
    4
    (128,128,128)
    (60,64,63)
    5
    (0,0,0)
    (20,20,17)
    6
    (0,255,255)
    (0,191,186)
    7
    (255,0,255)
    (225,92,188)
    8
    (255,255,198)
    (245,232,140)
    9
    (255,255,255)
    (240,243,242)
    10
    (255,0,0)
    (214,28,50)
    11
    (0,255,0)
    (0,173,62)
    12
    (0,0,255)
    (0,96,193)
    13
    (128,128,255)
    (0,114,204)
    14
    (128,255,128)
    (0,180,80)
    15
    (255,128,128)
    (226,60,73)
    16
    (255,255,0)
    (250,215,0)
    Printing from Lightroom – Printer Manages Color
    3) I chose Printer manages color, chose the appropriate paper in the printer dialogue box, and choose Adobe in the printer dialogue box.  The results are essentially the same as 2.
    4) I opened the image in "Windows Photo Viewer", printed the image, chose the appropriate paper in the printer dialogue box, and choose Adobe in the printer dialogue box.  The results are as follows:
    All Colors look close (for a color munki photo I guess)
    Photoshop RGB
    Color Munki Reading RGB
    1
    (198,198,198)
    (188,192,191)
    2
    (255,128,255)
    (238,143,209)
    3
    (128,255,255)
    (77,205,200)
    4
    (128,128,128)
    (121,126,125)
    5
    (0,0,0)
    (17,16,14)
    6
    (0,255,255)
    (0,190,186)
    7
    (255,0,255)
    (224,89,189)
    8
    (255,255,198)
    (244,239,186)
    9
    (255,255,255)
    (239,242,242)
    10
    (255,0,0)
    (214,22,41)
    11
    (0,255,0)
    (0,173,52)
    12
    (0,0,255)
    (0,96,198)
    13
    (128,128,255)
    (99,147,218)
    14
    (128,255,128)
    (82,196,118)
    15
    (255,128,128)
    (236,118,122)
    16
    (255,255,0)
    (254,215,0)
    Printing from Windows Photo Viewer – Printer Manages Color
    Did I miss something in the Lightroom print section?
    Message was edited by: David Nestico.  Rather than just posing a list of numbers, I summarized what I thought was important.  All data is there in case someone smarter than me can make more sense of it :)

    I thought my problem could be Lightroom is in ProphotoRGB color space, and my printer is Adobe1998 color space.  To test this, I changed the color space of my patches from prophoto to AdobeRGB. I checked my colors in Photoshop, and made them match the RGB number I specified.  It was interesting to note that (128,128,255) had a noticeable shift to purple.  the other colors shifted slightly.  Now I printed the test page with Lightroom managing color and the printer managing color.  Both images came out similar.
    This study came about when I was printing some images, and the sky had a definite purple shift.  So, I took the image into Photoshop and converted the colorspace from prophoto to Adobe.  Printed the image, and the image came out much better.
    So the question now is, do I need to convert each image I print in Photoshop, or am I doing something wrong in Lightroom?

  • Dynamically color to each column in Cross-tab report

    Hello All,
    I am a newbie in Crystal report,from last few weeks, i am working on cross tab crystal report.i have a requirement to show color dynamically for each column.i am adding an attachment how i want it. i tried dynamic coloring using object field formula but it is showing red color to all data.i want red color data when in 2nd  cross tab report data is beyond upper or lower limit in first cross tab table. it will be very helpful if somebody will give me any clue on this.... i read so many articles now it seem like impossible for me..:(
    i am using visual studio 2010 and sap crystal report version 13.0.0.99 for visual studio 2010.

    Hello Manish,
    I have attached a sample report that does this. You will need to remove the .txt extension from the attached file to open it as an .rpt file.
    Please right click on one of the value fields of the first cross tab in the report > Format Field > Common > Suppress if Duplicated conditional formula.
    The nested formula is as follows;
    numbervar array l;
    numbervar array u;
    numbervar x:=CurrentColumnIndex;
    if GridRowColumnValue ('@limit') = 'lower limit' then
    (redim preserve l[x];
    l[x]:= tonumber(CurrentFieldValue))
    else if GridRowColumnValue ('@limit') = 'upper limit' then
    (redim preserve u[x];
    u[x]:= tonumber(CurrentFieldValue));
    false
    So it assigns each lower and upper limit value for each client (in the sample it is country) to an array using the cross tabs column index to index the array and it ends in False as we don't actually want it to suppress if duplicated. This nested formula is just used to generate the arrays of upper and lower values.
    In the second cross tab if you again right click on one of the value fields > Format Field > Font > Color you will see the following conditional formula;
    numbervar array l;
    numbervar array u;
    numbervar x;
    if not(tonumber(CurrentFieldValue) in l[CurrentColumnIndex] to u[CurrentColumnIndex]) then
    crred
    else
    crblack
    So this compaes the current field value to range generated by the 2 arrays and assigns a color based on whether or not it is in the range.
    Regards,
    Graham

  • Set Default Color For BarChart YAxis.

    I am new to MS Chart. I am drawing a simple bar chart with following code. My chart draws red lines, for my datapoints    (Y Axis), I want to draw, I want to set the color of remaining data points for example for 1st record (i.e. dt1) my jobData
    have value 10, my graph shows red line for 10 points, for remaining 20 points I need to show the Green Line and also for the remaining data points. Thanks in advance.
             double[] jobData = new double[] { 10, 3, 4, 5, 2, 0, 2, 3, 0, 1 };
                DateTime dt1 = new DateTime(2015, 3, 17, 8, 30, 0);
                DateTime dt2 = new DateTime(2015, 3, 17, 8, 35, 0);
                DateTime dt3 = new DateTime(2015, 3, 17, 8, 40, 0);
                DateTime dt4 = new DateTime(2015, 3, 17, 8, 45, 0);
                DateTime dt5 = new DateTime(2015, 3, 17, 8, 50, 0);
                DateTime dt6 = new DateTime(2015, 3, 17, 8, 55, 0);
                DateTime dt7 = new DateTime(2015, 3, 17, 9, 00, 0);
                DateTime dt8 = new DateTime(2015, 3, 17, 9, 05, 0);
                DateTime dt9 = new DateTime(2015, 3, 17, 9, 10, 0);
                DateTime dt10 = new DateTime(2015, 3, 17, 9, 15, 0);
                DateTime[] xData = new DateTime[] { dt1, dt2, dt3, dt4, dt5,dt6,dt7,dt8,dt9,dt10 };
                InitializeComponent();
                //Horizontal bar chart
                //Create a chart area and add it to the chart
                ChartArea area = new ChartArea("First");
                chart1.ChartAreas.Add(area);
               // chart1.x = Color.Green;
              chart1.Size = new Size(1000, 700);
                //Create a series using the data
                Series barSeries = new Series();
                barSeries.XValueType = ChartValueType.DateTime;
                barSeries.BorderColor = Color.Green;
                barSeries.ChartType = SeriesChartType.Column;
                barSeries.Color = Color.Red;
                area.AxisX.LabelStyle.Format = "HH:mm";
                area.AxisY.Maximum = 30;
                area.AxisY.InterlacedColor = Color.Green;
                area.AxisY.Interval = 1;
              //  chart1.ChartAreas(0).AxisX.LabelStyle.Format = "HH:00"
                barSeries.Points.DataBindXY(xData, jobData );
                //Set the chart type, Bar; horizontal bars
                barSeries.ChartType = SeriesChartType.Bar;
                //Assign it to the required area
                barSeries.ChartArea = "First";
                //Add the series to the chart
                chart1.Series.Add(barSeries);

    I am not sure this is exactly what you mean, but, I think the only way to change the data color is to use a different series.
    Imports System.Windows.Forms.DataVisualization.Charting
    Public Class Form6
    Private Sub Form6_Load(sender As Object, e As EventArgs) Handles MyBase.Load
    'setup the chart
    With Chart1.ChartAreas(0)
    .AxisX.Title = "X"
    .AxisX.MajorGrid.LineColor = Color.LightBlue
    .AxisX.Minimum = 0
    .AxisX.Maximum = 24
    .AxisX.Interval = 6
    .AxisY.Title = "Y"
    .AxisY.MajorGrid.LineColor = Color.LightGray
    .AxisY.Minimum = 0
    .AxisY.Maximum = 24
    .AxisY.Interval = 6
    .BackColor = Color.FloralWhite 'AntiqueWhite 'LightSkyBlue
    .BackSecondaryColor = Color.White
    .BackGradientStyle = GradientStyle.HorizontalCenter
    .BorderColor = Color.Blue
    .BorderDashStyle = ChartDashStyle.Solid
    .BorderWidth = 1
    .ShadowOffset = 2
    End With
    Dim heading1 As String = " 1 - 12"
    Dim heading2 As String = "13 - 24"
    'draw the chart
    Chart1.Series.Clear()
    Chart1.Series.Add(heading1)
    Chart1.Series.Add(heading2)
    Chart1.Series(0).ChartType = DataVisualization.Charting.SeriesChartType.Line
    Chart1.Series(0).BorderWidth = 1
    Chart1.Series(0).Color = Color.Red
    Chart1.Series(0).BorderDashStyle = ChartDashStyle.Dash
    Chart1.Series(0).MarkerStyle = DataVisualization.Charting.MarkerStyle.Square
    Chart1.Series(0).MarkerSize = 4
    Chart1.Series(1).ChartType = DataVisualization.Charting.SeriesChartType.Line
    Chart1.Series(1).Color = Color.ForestGreen
    Chart1.Series(1).BorderWidth = 2
    For x = 1 To 24
    If x > 12 Then
    Chart1.Series(1).Points.AddXY(x, x)
    Else
    Chart1.Series(0).Points.AddXY(x, x)
    End If
    Next
    End Sub
    End Class

  • CR 9 - Need HELP Setting Line Graph colors in the Chart Expert

    Post Author: desselle
    CA Forum: Charts and Graphs
    Hello,
    I created a Crystal Report (CR) based off an existing Trend Analysis report. I have created a VB6 application that calls the .RPT file I created for the report in CR.  The VB6 app sets the report recordset via code that corresponds to the .TTX file, and the parameters .  The report contains a Line graph that plots five pieces of data.  The report & graph work good.  The Problem: CR determines the color of each line on the graph.  However, I need to set the color for each line to correspond to the colors used on our existing reports.  The users are accustom to a certain color representing a certain set of data on the existing reports.   I have tried everything I can think of and from all documentation I can find, and nothing changes the line colors.   I have tried all of the following:
    1.) From the Chart Expert, Option tab, I click the Format button next to Color and setup conditional color settings per each piece of data.   However, when I run the report these conditional color settings are not reflected on the CR graph.     I am using formula fields (based off database fields in the recordset) to produce the report.  However, I only see the database fields to use in the conditional color formatting screen and not the formula fields.    I thought this would possibly be the cause why the colors wonu2019t change on the CR, but I canu2019t find a way to make the formula fields show up in the list.
    2.)Also, I tried right clicking the individual lines of the graph and change the selected item color, but this didnu2019t change the color either.  I do this in Design mode and Preview mode and neither one changes the color of the lines on the graph.
    3.)I have also looked into the CR object model to see if I can change the line colors of the graph via code and it doesn't look like I am given this flexibility.
    Do you know what I am doing wrong here?   I just want to be able to set the color of each line on the CR graph to the color I want instead of using the default colors.  Are there some Hot Fixes that I need to apply to my copy of CR?
    Thanks

    Post Author: desselle
    CA Forum: Charts and Graphs
    Hello,
    I got the problem fixed w/ the line graph not making the data lines the same color on the report as on the frmPlot graph.   Compare the two screen shots below.   The problem was as follows:  When I created the graph (in the Chart Expert) the field u201CReadingDateu201D was not one of the Report Fields, and all the other fields were Report Fields (Reading, LowAlarm, UpperAlarm, LowerLimit, & UpperLimit). See the 3rd screen shot below.  ReadingDate does show up as a Report Field now but it wasnu2019t at first.   Originally, this field was only available in the Chart Expert as a recordset field.  When I changed this field to be a Report Field, the graph then allowed me to change the data series line colors.   This was not obvious at all.   From the beginning when I setup the graph and passed in the recordset from VB it graphed all of the data series fine.   The colors that the Chart Expert chose for each line just didnu2019t match what was on the frmPlot graph.   Anyway, it is working now.     I can at least say I learned (somethingu2019s to-do and somethingu2019s not to-do) a good bit about Crystal Reports in the process.
    Thanks

Maybe you are looking for

  • Empty CreatorDate field in PDF files generated by Report 6i on Windows 7

    When generating a PDF file from Reports 6i on Windows 7, the CreatorDate in the PDF file header is empty. Even worse: its opening parenthesis "(" is not closed. See example here below. This generates several problems with Adobe Reader 10 like: - text

  • 11g Database Adapter issue

    Hi there, I have a very simple BPEL process which just use Database Adapter to response result from one table, every thing works ok but a column with 'ROWID' datatype get a wrong data. Which means when the data in table is 'AAAOOMAAPAAAgGVAAl', the B

  • Creation of consolidated invoices in AP from legacy

    We have a requirement where we need to import AP invoices from legacy system. There is a specific requirement where the invoices from legacy system needs to be summed up and create one record in Oracle Payables. For example, if we have 3 invoices wit

  • Configure Role of Business System " as Central Integration Server , PI

    Hi Experts, I am running transaction code IDX5 in my xi system it is showing as "system is not a central integration server unable to start the program ".In SXMB_ADM role of business system need to configured .If we need to configure how to do this .

  • 'Static' class reloading

    OK - there are no static classses but. . . For a class which provides no way to create an instance of itself, does the class loader ever remove the class from memory? For instance, assume class Foo has a hugh static initializer. No other classes ever