diff --git a/pdfplumber/page.py b/pdfplumber/page.py
index c8e23f0..bbf052e 100644
--- a/pdfplumber/page.py
+++ b/pdfplumber/page.py
@@ -132,6 +132,11 @@ class Page(Container):
             attr["object_type"] = kind
             attr["page_number"] = pno
 
+            if hasattr(obj, "graphicstate"):
+                gs = obj.graphicstate
+                attr['stroking_color'] = gs.scolor
+                attr['non_stroking_color'] = gs.ncolor
+
             if hasattr(obj, "get_text"):
                 attr["text"] = obj.get_text()
 

Is it possible to extract Font Color?
Hi, I was just wondering if it's possible to extract the font color of characters from the PDF as they are normally available in the font-specs properties of the files.

I am aware of the `fontname` attribute of `pdf.chars` but is there any setting to extract other font properties as well?

@jsvine is this available in pdfplumber?
diff --git a/tests/test-basics.py b/tests/test-basics.py
index 57d5a04..1629b4d 100644
--- a/tests/test-basics.py
+++ b/tests/test-basics.py
@@ -62,6 +62,12 @@ class Test(unittest.TestCase):
             rect = pdf.pages[0].rects[0]
             assert rect['non_stroking_color'] == [0.8, 1, 1]
 
+    def test_text_colors(self):
+        path = os.path.join(HERE, "pdfs/nics-background-checks-2015-11.pdf")
+        with pdfplumber.open(path) as pdf:
+            char = pdf.pages[0].chars[3358]
+            assert char['non_stroking_color'] == [1, 0, 0]
+
     def test_load_with_custom_laparams(self):
         # See https://github.com/jsvine/pdfplumber/issues/168
         path = os.path.join(HERE, "pdfs/cupertino_usd_4-6-16.pdf")

pip install -e .[dev]
parse_log_pytest
pytest
nose pandas pytest
apt-get update apt-get install -y gcc apt-get install -y imagemagick apt-get install -y ghostscript
3.6
pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
attrs @ file:///opt/conda/conda-bld/attrs_1642510447205/work
certifi==2021.5.30
chardet==5.0.0
importlib-metadata @ file:///tmp/build/80754af9/importlib-metadata_1631916693255/work
iniconfig @ file:///home/linux1/recipes/ci/iniconfig_1610983019677/work
more-itertools @ file:///tmp/build/80754af9/more-itertools_1637733554872/work
nose==1.3.7
numpy==1.19.5
packaging @ file:///tmp/build/80754af9/packaging_1637314298585/work
pandas==1.1.5
pdfminer.six==20200104
-e git+https://github.com/jsvine/pdfplumber.git@81104301cb3b76a552dd4f2fd403321297c73d0f#egg=pdfplumber
Pillow==8.4.0
pluggy @ file:///tmp/build/80754af9/pluggy_1615976315926/work
py @ file:///opt/conda/conda-bld/py_1644396412707/work
pycryptodome==3.21.0
pyparsing @ file:///tmp/build/80754af9/pyparsing_1635766073266/work
pytest==6.2.4
python-dateutil==2.9.0.post0
pytz==2025.2
six==1.17.0
sortedcontainers==2.4.0
toml @ file:///tmp/build/80754af9/toml_1616166611790/work
typing_extensions @ file:///opt/conda/conda-bld/typing_extensions_1647553014482/work
unicodecsv==0.14.1
Wand==0.6.13
zipp @ file:///tmp/build/80754af9/zipp_1633618647012/work

name: pdfplumber
channels:
  - defaults
  - https://repo.anaconda.com/pkgs/main
  - https://repo.anaconda.com/pkgs/r
  - conda-forge
dependencies:
  - _libgcc_mutex=0.1=main
  - _openmp_mutex=5.1=1_gnu
  - attrs=21.4.0=pyhd3eb1b0_0
  - ca-certificates=2025.2.25=h06a4308_0
  - certifi=2021.5.30=py36h06a4308_0
  - importlib-metadata=4.8.1=py36h06a4308_0
  - importlib_metadata=4.8.1=hd3eb1b0_0
  - iniconfig=1.1.1=pyhd3eb1b0_0
  - ld_impl_linux-64=2.40=h12ee557_0
  - libffi=3.3=he6710b0_2
  - libgcc-ng=11.2.0=h1234567_1
  - libgomp=11.2.0=h1234567_1
  - libstdcxx-ng=11.2.0=h1234567_1
  - more-itertools=8.12.0=pyhd3eb1b0_0
  - ncurses=6.4=h6a678d5_0
  - openssl=1.1.1w=h7f8727e_0
  - packaging=21.3=pyhd3eb1b0_0
  - pip=21.2.2=py36h06a4308_0
  - pluggy=0.13.1=py36h06a4308_0
  - py=1.11.0=pyhd3eb1b0_0
  - pyparsing=3.0.4=pyhd3eb1b0_0
  - pytest=6.2.4=py36h06a4308_2
  - python=3.6.13=h12debd9_1
  - readline=8.2=h5eee18b_0
  - setuptools=58.0.4=py36h06a4308_0
  - sqlite=3.45.3=h5eee18b_0
  - tk=8.6.14=h39e8969_0
  - toml=0.10.2=pyhd3eb1b0_0
  - typing_extensions=4.1.1=pyh06a4308_0
  - wheel=0.37.1=pyhd3eb1b0_0
  - xz=5.6.4=h5eee18b_1
  - zipp=3.6.0=pyhd3eb1b0_0
  - zlib=1.2.13=h5eee18b_1
  - pip:
      - chardet==5.0.0
      - nose==1.3.7
      - numpy==1.19.5
      - pandas==1.1.5
      - pdfminer-six==20200104
      - pillow==8.4.0
      - pycryptodome==3.21.0
      - python-dateutil==2.9.0.post0
      - pytz==2025.2
      - six==1.17.0
      - sortedcontainers==2.4.0
      - unicodecsv==0.14.1
      - wand==0.6.13
prefix: /opt/conda/envs/pdfplumber

tests/test-basics.py::Test::test_text_colors
tests/test-basics.py::Test::test_colors tests/test-basics.py::Test::test_crop_and_filter tests/test-basics.py::Test::test_load_with_custom_laparams tests/test-basics.py::Test::test_metadata tests/test-basics.py::Test::test_page_number tests/test-basics.py::Test::test_pagecount tests/test-basics.py::Test::test_password tests/test-basics.py::Test::test_rotation
pdfplumber/page.py
pdfplumber/page.py