You can find a hex code in Adobe Illustrator through six routes: the Color panel, the Color Picker, the Eyedropper tool, the Appearance panel, the Properties panel, or the Document Info panel. Which one is fastest depends on what you already have selected. If the artwork exists on the canvas, the Color panel and Eyedropper give you a value in seconds. If the color lives in a saved swatch or a library like Pantone, the swatch panel and Document Info panel are more reliable. One boundary up front: Illustrator stores swatches in several color models, and a CMYK or Pantone swatch shows no hex value until you convert it.
Before You Start: What You Need Open
Three prerequisites make every method below work predictably.
A document open in Adobe Illustrator, with at least one object that has a fill or stroke you want to inspect. The Essentials or Standard workspace active, so panels named here are visible under the Window menu. The object deselected if you want to read a saved swatch rather than the object's current appearance.
Two settings change what you see. In the Color panel flyout menu, the "Show Options" command should be enabled — otherwise the hex field is hidden. And in Preferences under Appearance of Black, Illustrator has two separate definitions for black (one for on-screen display, one for printing); the hex readout follows the on-screen definition.
A quick success check before you go further: open the Color panel and confirm a six-character field with a "#" prefix is visible at its bottom right. If it is not, enable Show Options first.
Method 1: Read the Hex Code From the Color Panel
This is the fastest route for a color already applied to an object.
1: Select the object with the Selection tool (V). 2: Open Window > Color, or press F6. 3: Click the Fill box at the bottom of the toolbox, or the Stroke box, depending on which you want to inspect. 4: Look at the bottom of the Color panel for the field that begins with "#". It holds the six-digit hex value. 5: Click the field, select all, and copy the value.
The panel shows the value in the active color mode's terms but always offers the hex readout as a translation. If the object uses a global swatch, the panel displays the swatch's color and a small white triangle in the corner — editing the hex field then edits every object using that swatch, which is either a feature or a trap depending on your intent. Deselect the object and click the swatch in the Swatches panel first if you only want to read the value without touching it.
Method 2: Open the Color Picker for an Exact Hex Entry or Readout
The Color Picker is where hex values are entered and confirmed, and it doubles as a readout.
1: Double-click the Fill or Stroke box in the toolbox. 2: The Color Picker opens. The hex field sits at the bottom of the dialog, prefixed with "#". 3: Read the current value, or type a new one and press Enter or Return to apply it. 4: Click OK to commit the change or Cancel to close without altering the object.
The picker also displays the equivalent RGB, HSB, Lab, and CMYK values, so it is the one place to see all models side by side. A useful detail: the picker's hex field accepts three-digit shorthand (for example, #F00) and expands it to six digits on entry. If you paste a longer string, the field rejects it rather than truncating silently, which makes it a safe place to verify a code you copied from a brand book.
Method 3: Use the Eyedropper to Sample Any Color on the Canvas
When the color exists somewhere on the artboard — a placed raster image, a gradient, another object — the Eyedropper samples it directly.
1: Select the object you want to receive the color. 2: Choose the Eyedropper tool (I). 3: Hold Alt (Windows) or Option (macOS) to switch to sampling mode; the cursor changes appearance. 4: Click the pixel or object holding the target color. 5: Release Alt/Option and check the Color panel for the resulting hex value.
The crucial limitation: the Eyedropper copies the sampled color into the selected object's fill, so you are changing artwork to learn a value. Work on a duplicate (Ctrl/Cmd+D) or press Ctrl/Cmd+Z immediately after reading the hex code if you only wanted the number. Sampling from a linked raster image returns the color of the pixel under the cursor at the image's displayed resolution, so zoom in before clicking if the area is small. Clicking an anti-aliased edge pixel returns a blended color that is not the shape's true fill — sample the interior instead.
Method 4: Inspect Saved Swatches Without Altering Artwork
Swatches are the reliable source when a brand palette must be shared or reinstated. Here is how to read their hex values.
1: Open Window > Swatches. 2: Double-click a swatch to open its Swatch Options dialog. 3: Note the Color Mode. If it reads RGB, the hex value is available in the Color panel after selecting the swatch. If it reads CMYK, Pantone, or a spot color, no direct hex value exists — conversion is required. 4: Click OK or Cancel to close the dialog, then check the Color panel for the "#" field.
For CMYK swatches, the conversion depends on the document's assigned CMYK profile (Edit > Assign Profile, or the profile shown under Edit > Color Settings). Two documents with different CMYK profiles produce different hex values for the same swatch, which is why a brand-guideline hex code and Illustrator's translation can disagree. Always note which document profile produced a conversion.
Spot colors from the Pantone libraries are a special case. A Pantone swatch is an ink specification, not an RGB value. Illustrator can show a hex approximation through its conversion, but that approximation changes between libraries and is not authoritative — check the ink maker's published conversion if the exact RGB value matters.
Method 5: Use the Appearance Panel for Strokes, Effects, and Grouped Colors
The Color panel shows the fill or stroke of the current selection, but nested appearances — a stroke inside a group, an effect's color, text fill versus text stroke — need the Appearance panel.
1: Open Window > Appearance. 2: With the object selected, click the Fill or Stroke row in the panel's stack. 3: The Color panel updates to the color attached to that row; read the "#" field there. 4: Click other rows to inspect layered fills, strokes, and applied effects one at a time.
This route matters when an object looks like one color but contains several. A shape with a fill, a stroke, and a drop shadow holds three separate colors, and the toolbox's fill box reflects only the topmost selection level. If the Appearance panel shows a question-mark icon in place of a color row, the selection contains objects with different colors — choose a single object or use the Document Info panel below.
Method 6: Export a Color Inventory With the Document Info Panel
When you need every color in a document rather than one at a time, the Document Info panel lists them in bulk.
1: Open Window > Document Info. 2: Open the panel flyout menu and choose the categories you want — for color, select "Objects" and check the relevant options. 3: Choose the "Selection Only" option from the flyout if you want to restrict the report to selected art. 4: Read the listed colors, or use the flyout's Save command to write the report to a text file.
The report lists color values in the models used in the document, so RGB swatches appear as RGB and CMYK swatches as CMYK. Hex values may not appear directly in the text export; convert them by reading each color in the Color panel. This method is best for auditing a file before handoff, not for grabbing a single value.
A Comparison of the Six Routes
| Method | Best for | Speed | Changes artwork? | Shows hex for spot/CMYK? |
|---|---|---|---|---|
| Color panel | Color already applied to a selection | Fastest | No | Shows conversion only |
| Color Picker | Entering, confirming, or reading one color | Fast | On OK only | Shows conversion only |
| Eyedropper | Colors in raster images or elsewhere on canvas | Fast | Yes, unless undone | Yes, sample-based |
| Swatch double-click | Saved palettes and brand colors | Medium | No | Requires conversion step |
| Appearance panel | Nested fills, strokes, effects | Medium | No | Shows conversion only |
| Document Info | Full-document color audit | Slow | No | Lists models, not hex |
The practical split: use the Color panel for one-off reads, the Eyedropper for raster sources, and Document Info when you are preparing files for someone else.
When Something Goes Wrong: Common Failure Cases
Symptom: the hex field is missing from the Color panel. Cause: Show Options is off. Fix: open the panel flyout and enable Show Options.
Symptom: the Color panel shows a grayscale slider with no hex field. Cause: the document color mode is Grayscale (File > Document Color Mode). Fix: switch to RGB or CMYK, acknowledging that this changes how all colors are displayed and printed.
Symptom: the hex value changes after you reopen the file or move it to another machine. Cause: the document's CMYK profile differs, or the swatch is a spot color being approximated. Fix: standardize the profile in Color Settings and treat one profile as the reference.
Symptom: the Eyedropper copied nothing, or copied a different color than expected. Cause: a gradient mesh, pattern, or anti-aliased edge pixel was sampled. Fix: zoom in, sample a flat interior pixel, or fall back to the Color panel on the object itself.
Symptom: the copied hex code looks wrong on the web or in another app. Cause: hex is an RGB notation; a color specified in CMYK or as a Pantone ink is being converted. Fix: compare against the conversion the destination app will use, and state the profile.
Stop condition: if a client's brand guide supplies a hex code and Illustrator's conversion of their Pantone or CMYK value does not match it, do not "fix" the swatch by guessing. Ask the brand owner which reference (hex or ink) governs, and record the answer alongside the file.
Practical Notes on Accuracy
Hex is a six-digit RGB notation, two digits each for red, green, and blue, from 00 to FF. Illustrator's hex field is a display and entry convenience layered over the document color model; it is not a separate color type. That distinction explains most confusion. An RGB swatch holds the exact hex. A CMYK or spot swatch holds an ink recipe, and the hex you see is the result of a conversion that depends on profile settings.
One more detail worth knowing for handoff: when you send a color to a developer, include the hex value and the color model and profile it came from. A hex value alone implies sRGB, and a CMYK conversion in Illustrator with a U.S. Web Coated profile can produce a hex approximation several steps away from the same color converted under a different profile. The number is only as precise as the conditions behind it.
Frequently Asked Questions
Can I find a hex code without selecting anything? Only through the Document Info panel's report or by double-clicking a swatch. The Color panel reflects the current selection or the toolbox fill, so selection is the normal prerequisite.
Why does my Pantone swatch show a hex value I don't recognize? Because Illustrator converts the ink to RGB for display, and the conversion depends on the current libraries and settings. Treat it as an approximation and check the ink maker's published RGB equivalent if exactness matters.
Does the hex field work in both RGB and CMYK documents? Yes, it displays and accepts hex in either mode, but the underlying color is whatever model the swatch uses. In a CMYK document, typing a hex value converts it to CMYK immediately, and the stored value is the CMYK conversion.
Is there a keyboard shortcut to copy the hex value? No dedicated one exists. Click the "#" field, select all, and copy. Repeating this often makes a custom action or a script the faster long-term answer.
Why do two objects that look identical show different hex codes? Overlapping transparency, a blend mode, or an effect changes the rendered pixel color without changing the fill's stored color. Read the value from the Appearance panel row, not from the screen.